开发者

alternating row color disappears after initial onload in Chrome and Firefox....works fine in IE

开发者 https://www.devze.com 2022-12-23 01:12 出处:网络
The CSS: tr.row1 { background-color: #FFFFFF; } tr.row2 { background-color: #E0E0FF; } I am using pagination and the resul开发者_JAVA技巧ts show fine in IE but disappear in Chrome and Firefox wh

The CSS:

 tr.row1 { background-color: #FFFFFF; }

 tr.row2 { background-color: #E0E0FF; }

I am using pagination and the resul开发者_JAVA技巧ts show fine in IE but disappear in Chrome and Firefox when advancing forward from page 1.


Doesn't answer your question, but if the alternating row colour isn't crucial, you can do this with CSS3 nth-child selector, which works with newer versions of all browsers:

tr:nth-child(even) {background: #FFFFFF}
tr:nth-child(odd) {background: #E0E0FF}
0

精彩评论

暂无评论...
验证码 换一张
取 消