Include the CSS bullet along the <LI> tag during hover - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover on list

Description

Include the CSS bullet along the <LI> tag during hover

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
.bckA {<!--from w w  w  .  j  a va2 s.c o  m-->
   background-color:Chartreuse;
}

.bckB {
   background-color:yellow;
}

.anim {
   counter-reset:section;
   list-style-type:none;
}

.anim li {
   transition:all 201ms;
   transform-origin:left;
}

.anim li::before {
   counter-increment:section;
   content:counter(section) ". ";
}

.anim li:hover {
   transform:scale(2.6);
}
</style> 
 </head> 
 <body> 
  <ul class="font anim"> 
   <li class="bckA">Lorem</li> 
   <li class="bckB">Lorem</li> 
  </ul>  
 </body>
</html>

Related Tutorials