Closed. 这个问题是无法重现或由拼写错误引起 /help/closed-questions 。目前不接受答案。
我正在我的网站上工作,每当我向 CSS 文件添加一些新行时,它只是不想使用我所做的行。
不过,他们应该没问题。
.what-new {
padding:2em 0 4em;
text-align:center;
}
.what-new h3 {
font-size:4em;
font-weight:700;
color:#000;
margin:0.5em 0;
举个例子。
CSS 文件在某一部分正在工作,但从某个地方它就停止使用我的文件。
然而,它链接在 head >.
<link rel="stylesheet" href="style/css_2-play.css" type="text/css"/>
我的 HTML 代码如下(请注意,这只是代码的一部分):
<div class="what-new">
<div class="container">
<h3>What's new</h3>
<div class="blog-news">
<div class="blog-news-grid">
<div class="news-grid-left">
<h4>06</h4>
<small>of january 2015</small>
</div>
有人知道解决方案吗?
这意味着您的CSS 规则未应用 或者你的CSS 文件已缓存 .
可能的原因有:
CSS 规则a 更高的特异性 https://stackoverflow.com/a/21728972/1654265 正在赢得您期望应用的规则
具有相同 Specificity 的 CSS 规则是在你之后加载 (声明的顺序很重要 - 后者获胜 - 因此请检查您的 CSS 文件导入)
针对您的对象使用的 CSS 规则the !important keyword http://css-tricks.com/when-using-important-is-the-right-choice/ .
Inspect how the rules are applied through the browser's Developer Tools (open with F12 ).
HINT: 在 CSS 面板中,规则按重要性降序排列。
你的 CSS 有语法错误
你的 HTML 是格式不正确
使用一些验证器 .
Force the refresh of the browser-cached resource by pressing CTRL F5 .
HINT: 本次问答 https://stackoverflow.com/q/385367/1654265 探讨这个主题。
Force the refresh of the server-cached resource by entering the URL of the static resources in the Address Bar and pressing CTRL F5 on that page (that is the CSS file).
HINT: To open the CSS file's URL fastly, use Open link in a new Tab from the browser's Developer Tools, or click on the CSS link in the HTML opened with View Source .
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)