Make repeating-linear-gradient for a table continue over multiple cells - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

Make repeating-linear-gradient for a table continue over multiple cells

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <style>
table.striped {<!-- w  ww .j  av a  2  s  .  c  o m-->
   background:repeating-linear-gradient(
   46deg,
   Chartreuse,
   yellow 11px,
   blue 11px,
   pink 21px
   )
}

tr:not(.striped) {
   background:white;
}

td {
   background:none;
   padding:11px;
}

table {
   border-spacing:0;
   border-collapse:collapse;
}
</style> 
 </head> 
 <body translate="no"> 
  <table class="striped"> 
   <tbody> 
    <tr> 
     <td>Lo</td> 
     <td>Lorem i</td> 
     <td>Lore</td> 
    </tr> 
    <tr class="striped"> 
     <td>Lo</td> 
     <td>Lorem</td> 
     <td>Lorem ipsum dolor</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials