table 隔行变色 触摸 <style>
tr:nth-child(odd){background:#eae9e9;}
tr:hover { background:#feb916;}
tr {background-color:expression((this.sectionRowIndex%2==0)?"red":"blue")}
文章讲述了如何使用CSS选择器tr:nth-child()实现表格行的隔行变色效果,以及tr:hover用于鼠标悬停时的背景颜色改变。同时提到了过时的expression方法,用于IE浏览器的行背景色交替。
table 隔行变色 触摸 <style>
tr:nth-child(odd){background:#eae9e9;}
tr:hover { background:#feb916;}
tr {background-color:expression((this.sectionRowIndex%2==0)?"red":"blue")}

被折叠的 条评论
为什么被折叠?
