【发布时间】:2016-03-10 11:41:58
【问题描述】:
我正在使用以下样式从我的 HTML 代码中动态显示替代颜色,但这些样式在 IE7 和 IE8 中不起作用。它的所有工作都来自上面的 IE9。我开始知道这些样式不兼容 IE7 和 8。
能否请您在 CSS 中显示替代方法,以便它们在 IE7 及更高版本中工作?
table.idclass tbody tr:nth-child(2n) td {
background-color: red;
}
table.idclass tbody tr:nth-child(2n+1) td {
background-color: blue;
}
table.idclass thead tr th:not(.innerclassid) after {
content: "\25C0\25C0";
}
【问题讨论】:
-
您在最后一个选择器中的
after应该是:after。现代浏览器使用::after,但为了向后兼容,首选单冒号。
标签: html css internet-explorer internet-explorer-8 internet-explorer-7