Changing body background when hovering over a link - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover Link

Description

Changing body background when hovering over a link

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">
html, body, div {
   margin:0;
   height:100%;
}

#magic:hover + div {
   background:red;
}

input {<!--  w  ww .  j  a v  a  2s.  co m-->
   position:fixed;
   left:-100%;
}
</style> 
 </head> 
 <body> 
  <input id="magic" type="checkbox"> 
  <div> 
   <label for="magic"> <a href="#">Lore</a> </label> 
  </div>  
 </body>
</html>

Related Tutorials