使用Paul Irish和gang的HTML5BoilerPlate模板(虽然,我不是说它与它有任何关系),我在页面上呈现的标签内部有一些样式。如果我把它们移到里面,它们就可以工作了。我之前做过一些快速编辑,从未见过在页面上呈现的样式。以下是头部代码的示例:
<!doctype html public "*">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width">
<title>Title</title>
<meta name="bitly-verification" content="xxxxxxxxxxxx" />
<meta name="google-site-verification" content="xxxxxxxxxxxxx" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="stylesheet" type="text/css" media="all" href="css.css" />
</head>
<body>
<div id="container">
<style>
...
</style>
</div>
</body>
但是,我们发现取出容器div允许样式标签工作,它们不再显示在呈现的页面中。我们还没想到的是为什么这很麻烦。有没有人遇到过这个问题?或者任何人都可以了解为什么会发生这种情况?
不仅仅是知识问题上的交易破坏者。感谢。
* *编辑:#selector&gt; *是罪魁祸首 - 阿尔! *