我的表格(在 Chrome、FireFox 和 Opera 上完美运行)在 Internet Explorer 上显示不正确.
My table (that works perfectly on Chrome, FireFox and Opera) is not displaying correctly on Internet Explorer.
背景保持白色!(我使用的是 IE-8)
The background remains white! (I am using IE-8)
CSS 代码:
/*My Table*/
.my_table{
border-collapse:collapse;
font:normal 14px sans-serif,tahoma,arial,verdana;
margin:5px 0;
}
.my_table th{
color:#fff;
background:#5E738A;
border:1px solid #3C5169;
text-align:center;
padding:4px 10px;
}
.my_table td{
color:#555;
border:1px solid #C1CAD4;
text-align:center;
padding:2px 5px;
}
.my_table tr:nth-child(even){
background:#E6EDF5;
}
.my_table tr:nth-child(odd){
background:#F0F5FA;
}
恐怕IE8不支持nth-child选择器:
IE8 doesn't support the nth-child selector I'm afraid:
http://reference.sitepoint.com/css/pseudoclass-nthchild
这篇关于IE:使用奇数/偶数的 nth-child() 不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
:hover:before text-decoration none 没有效果?:hover:before text-decoration none has no effects?(:hover:before text-decoration none 没有效果?)
当您特定时,CSS 会更快吗?Is CSS faster when you are specific?(当您特定时,CSS 会更快吗?)
CSS 兄弟选择器(选择所有兄弟)CSS sibling selectors (select all siblings)(CSS 兄弟选择器(选择所有兄弟))
如何判断一个元素是否在影子 DOM 中?How can I tell if an element is in a shadow DOM?(如何判断一个元素是否在影子 DOM 中?)
我可以使用 CSS 为任何元素添加项目符号吗?Can I use CSS to add a bullet point to any element?(我可以使用 CSS 为任何元素添加项目符号吗?)
非空属性的 CSS 属性选择器CSS attribute selector for non-empty attributes(非空属性的 CSS 属性选择器)