Change box background-color on hover - HTML CSS CSS Property

HTML CSS examples for CSS Property:background-color

Description

Change box background-color on 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">

div {<!--  ww w .  j  av  a2s .  c om-->
   height: 200px;
   width: 200px;
   background-color: pink;
}
div:hover {
   background-color: blue;
}


      </style> 
 </head> 
 <body> 
  <div> 
   <ul> 
    <li> <a href="#">Hello</a> </li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials