take nth-child in css - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:nth-child

Description

take nth-child in css

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">
tr:not(:last-child)>td, tr:last-child>td:not(:last-child) {
   color:Chartreuse;
}
</style> <!--  w  w  w .j  a  va  2s.  co  m-->
 </head> 
 <body> 
  <table> 
   <tbody> 
    <tr> 
     <td>L</td> 
     <td>L</td> 
     <td>L</td> 
    </tr> 
    <tr> 
     <td>L</td> 
     <td>L</td> 
     <td>L</td> 
    </tr> 
    <tr> 
     <td>L</td> 
     <td>L</td> 
     <td>L</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials