CSS:IE8中的n-child

时间:2015-02-13 11:05:19

标签: css css3 internet-explorer-8

我试图让一些n-child在ie8工作,这是我所拥有的规则的例子,但是你可能知道它在i8中不起作用

th:nth-child(n+3) {
    text-align: center;
}

但它必须在IE8中工作,我知道在ie8中支持第一个孩子,并且很容易使用

td:first-child + td + td

但是当我(n+)时,我不知道怎么办,有人知道如何在ie8中完成这项工作,但是你可能会看到第三个孩子吗?

1 个答案:

答案 0 :(得分:2)

如果你有固定数量的元素,你可以手动定义它们,这是在HTML标记中使用没有类的纯CSS的唯一方法。

td:first-child,
td:first-child + td + td + td,
td:first-child + td + td + td + td + td + td,
td:first-child + td + td + td + td + td + td + td + td + td {...}

http://jsfiddle.net/63aw8yhv/2/

相关问题