Change body background color when link hovering - HTML CSS CSS Property

HTML CSS examples for CSS Property:background-color

Description

Change body background color when link hovering

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">

.special:hover:before{<!--from   w w  w  .ja  v a2s .c  o  m-->
   content: '';
   position: fixed;
   display: block;
   top: 0; bottom: 0; left: 0; right: 0;
   z-index: -1;
   background-color: #ff0000;
}
      </style> 
 </head> 
 <body> 
  <a class="special">Test</a>  
 </body>
</html>

Related Tutorials