我有麻烦让Selectivizr工作,即使是一个非常简单的页面。我做错什么了?
http://jiewmeng.kodingen.com/playground/selectivr.html
<html>
<head>
<link rel="stylesheet" href="selectivr.css" />
<script src="https://ajax.googleapis.com/ajax/libs/mootools/1.3.1/mootools-yui-compressed.js"></script>
<!--[if (gte IE 6)&(lte IE 8)]>
<script src="selectivizr.js"></script>
<![endif]-->
</head>
<body>
<h1>Hello World</h1>
<p>Paragraph 1</p>
<p>Paragraph 2</p>
<p>Paragraph 3</p>
<p>Paragraph 4</p>
<p>Paragraph 5</p>
<p>Paragraph 6</p>
</body>
</html>CSS
p:nth-child(2n+2) { color: red }发布于 2011-08-22 22:13:13
只有当你的页面处于严格模式时,Selectivizr才起作用。因为你没有给你的页面一个doctype declaration,它以怪异的模式加载,这意味着Selectivizr还没有加载。
只需在开始的html标记之前添加<!DOCTYPE html>,就可以使用Selectivizr。
发布于 2011-09-07 19:09:55
您可能希望将链接添加到selectivizr将对其执行操作的现有css。
以下是你应该在你的案例中放入头部的完整代码:
<!--[if (gte IE 6)&(lte IE 8)]>
<script type="text/javascript" src="/js/selectivizr/selectivizr.js"></script>
<noscript><link rel="stylesheet" href="selectivr.css" /></noscript>
<![endif]-->还有另外两个已知问题:
希望它能帮上忙!祝好运。
https://stackoverflow.com/questions/5840316
复制相似问题