CSS3 :: before和:: after伪元素是否支持IE9?

CSS3 :: before和:: after伪元素是否支持IE9?

问题描述:

此MS兼容性表它说,IE9不支持 :: before :: after 后,但是当我尝试似乎它...查看 JSBin

On this MS compatibility table it says, IE9 does not support pseudo-elements ::before and ::after, but when I try it seems it does... see JSBin

我做错了什么?我认为 :: before :: after 将是很好的工具来隐藏的东西从IE9,不要。

Am I doing something wrong? I thought ::before and ::after would be nice tools to hide stuff from IE9, when in fact, they don't.

CSS2伪元素:before :after 与传统的单冒号表示法,由IE8和更高版本支持。它们不是CSS3的新功能。

The CSS2 pseudo-elements :before and :after, with the traditional single-colon notation, are supported by IE8 and later. They are not new to CSS3.

另一方面,双冒号表示法是 new to CSS3 。 IE9 支持 :: before的新符号 : :after ,同样对于CSS1伪元素 ::第一行 :: first-letter 。然而,未来,没有新的伪元素可以使用单冒号语法,并且浏览器(包括IE)预期支持所有伪元素的双冒号语法。

The double-colon notation, on the other hand, is new to CSS3. IE9 does support this new notation for ::before and ::after, and likewise for the CSS1 pseudo-elements ::first-line and ::first-letter. Going forward, however, no new pseudo-element may use the single colon syntax, and browsers (including IE) are expected to support the double colon syntax for all pseudo-elements.

我没有线索为什么该表说IE9不支持新的伪元素语法,因为它肯定是根据上面链接的单个选择器的文档和你的测试用例。以及,当然,这个答案。

I have no clue why that table says IE9 doesn't support the new pseudo-element syntax, because it certainly does according to the docs for the individual selectors linked above, and your test case. As well as, of course, this answer.