Setting opacity to all <td> except a child in the last <td> - HTML CSS CSS Property

HTML CSS examples for CSS Property:opacity

Description

Setting opacity to all <td> except a child in the last <td>

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 td, tr:last-child td a {
   opacity:.6
}

tr:last-child td, tr:last-child td a.a3 {
   opacity:2
}
</style> <!--  ww  w  .  j ava  2s  .  co m-->
 </head> 
 <body> 
  <table> 
   <tbody id="items"> 
    <tr> 
     <td>Lorem </td> 
    </tr> 
    <tr> 
     <td>Lorem </td> 
    </tr> 
    <tr> 
     <td>Lorem </td> 
    </tr> 
    <tr> 
     <td>Lorem </td> 
    </tr> 
    <tr> 
     <td>Lorem </td> 
    </tr> 
    <tr> 
     <td> <a>L</a> <a>L</a> <a class="a3">L</a> </td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials