CSS mouse hover behaviour - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover

Description

CSS mouse hover behaviour

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">
table {<!--from   ww  w . java 2  s.  c o  m-->
   border-collapse:collapse;
}

td {
   border:3px dotted Chartreuse;
}

table .line_0 td {
   background:yellow;
}

table .line_1 td {
   background:blue;
}

table .line_0:hover td,
table .line_1:hover td {
   color:pink;
}
</style> 
 </head> 
 <body> 
  <table> 
   <tbody> 
    <tr class="line_0"> 
     <td>L</td> 
     <td>L</td> 
     <td>L</td> 
     <td>L</td> 
     <td>L</td> 
    </tr> 
    <tr class="line_1"> 
     <td>L</td> 
     <td>L</td> 
     <td>L</td> 
     <td>L</td> 
     <td>L</td> 
    </tr> 
    <tr class="line_0"> 
     <td>L</td> 
     <td>L</td> 
     <td>L</td> 
     <td>L</td> 
     <td>L</td> 
    </tr> 
    <tr class="line_1"> 
     <td>L</td> 
     <td>L</td> 
     <td>L</td> 
     <td>L</td> 
     <td>L</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials