Add a hover/selected to the LI - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover on list

Description

Add a hover/selected to the LI

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">
li {<!--   www  . ja  va2  s  . com-->
   border:2px solid Chartreuse;
}

.ui-state-active {
   background:yellow;
}

.ui-state-active:hover {
   background:blue;
}

li.ui-menu-item a {
   display:block;
}
</style> 
 </head> 
 <body> 
  <ul> 
   <li class="ui-menu-item" role="menuitem"> <a class="ui-corner-all ui-state-active" tabindex="-1"> <img src="https://www.java2s.com/style/demo/Google-Chrome.png"> <span class="text">Lorem ipsum </span> </a> </li> 
  </ul>  
 </body>
</html>

Related Tutorials