为table的奇数行和偶数行设置样式

<style type="text/css">  
    .my_table tr:nth-child(even) {  
        background: #d8ebfa;  
    }  
    .my_table tr:nth-child(odd) {  
        background: White;  
    }  
</style>  

 

posted @ 2017-06-08 00:17  pding  阅读(1244)  评论(0编辑  收藏  举报