我有两个html代码段:
#header {
text-align: center;
font-size: 14px;
font-family: "Gill Sans MT";
margin-top: 30px;
}
#123 {
text-align: center;
font-size: 14px;
font-family: "Gill Sans MT";
margin-top: 30px;
}
<div id="header">
<!-- *** Section 1 *** --->
<h3>Time series of applications to 'Research Grants (Open Call)' for this Financial Year<br> and the previous three with 'Bollinger Bands'.</h3><br>
</div>
<div id="123">
<!-- *** Section 1 *** --->
<h3>Time series of applications to 'Research Grants (Open Call)' for this Financial Year<br> and the previous three with 'Bollinger Bands'.</h3><br>
</div>
完全相同的内容,但ID不同。
现在,只有header
ID有效,123
没有....如果我把123
css放在header
css上面,那么它们都不起作用
有人可以解释发生了什么,因为我很难过!
答案 0 :(得分:-1)
id必须以字母[a-zA-Z]开头。这解释了为什么123无效。
尝试更改ID。另外,您使用的是其他一些框架,如bootstrap吗?