1

here's a landing page I've coded up:

http://rsa-partner.com/

It all looks fine in every browser bar IE8. In IE8, the advanced CSS selector 'nth child' is not recognised.

I downloaded and linked selectivizr.js (http://selectivizr.com/), which should have sorted it in ie, but alas, the background images that show on all my nth child selectors are not showing. The code is

<!--[if (gte IE 6)&(lte IE 8)]>
<script type="text/javascript" src="js/selectivizr-min.js"></script>
<![endif]-->

Is there something I'm missing? I swear I've used conditional IE specific comments before and got nothing back. Any suggestions would be much appreciated.

Of course I could simply remove my nth child selectors and replace with specific classes but I'd like to avoid that if possible!

4

1 回答 1

0

如果您的内容是动态加载的(例如,如果您使用的是 CMS 系统),那么它会在 Selectivizr 运行后加载,因此它将无法工作。

来自selectivzr.com

仿真不是动态的。一旦应用了样式,它们就会被修复,因此不会反映对 DOM 的更改。

我建议改用Modernizr。如果浏览器不支持,您可以检查css-lastchild并自定义样式(连同其余的 CSS3 选择器,如nth-child等)。我分担你的痛苦!

于 2014-11-19T13:24:38.657 回答