js兼容标准的表格变色效果

符合标准的表格变色的js代码






* { margin:0; padding:0; font-size:14px }
body { text-align:center;}
#btn { list-style:none inside; width:210px; margin:10px auto; clear:both; }
#btn li { float:left; width:100px; line-height:20px }
#btn li a{ display:block; text-decoration:none; color:#333333}
#gray { background:#f5f5f5; cursor: pointer }
#green { background:#D7ECDE; cursor:pointer }
table { border-collapse:collapse; width:70%; margin:10px auto }
td { line-height:100%; height:24px; line-height:24px; padding:0 4px }
td a { text-decoration:none; color:#333; display:block; }
#tab_gray td { border:1px solid #B9B9B9; background: #F2F2F2; }
#tab_green td { border:1px solid #95CCA7; background:#EBF5EE; }
#tab_gray td:hover, #tab_green td:hover { background:#fff; }




    gray
    green


    
        Table
        Table
        Table
    
    
        hello
        hello
        hello
    
    
        hello
        hello
        hello
    




以上就是js兼容标准的表格变色效果的详细内容,更多请关注0133技术站其它相关文章!

赞(0) 打赏
未经允许不得转载:0133技术站首页 » JavaScript 教程