.css 文件:
#1test {
color:red;
text-align:center;
}
#1test {
color:red;
text-align:center;
}
.html 文件:
<html>
<p id="1test">hey</p><br/>
<p id="2test">idk</p>
</html>
我不明白它有什么问题:/
最佳答案
1) 您没有包含 .css 文件。
2) id名称不能以数字开头。
关于html - CSS 不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38426712/