即使有一个非常简单的页面,我也很难让Selectivizr工作.我做错了什么? http://jiewmeng.kodingen.com/playground/selectivr.html htmlhead link rel="stylesheet" href="selectivr.css" / script src="https://ajax.googleapis.com
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 }
Selectivizr仅在您的页面处于严格模式时才有效.因为你没有给你的页面一个
doctype declaration,它在Quirks模式下加载,这意味着Selectivizr没有加载.
只需添加<!DOCTYPE html>在打开html标签之前,Selectivizr会工作.
