为什么你不能在 CSS 中使用数字,还有另一种方法吗?我有以下代码:
<div class="center 400-width" id="position">
<div class="" id="header">
Header
</div>
<div class="" id="content">
Content
</div>
<div class="" id="footer">
Footer
</div>
</div>
CSS 选择类400-width
,这意味着容器的宽度为400px
. 并且background-color
用于检查它是否为真。
.400-width{
width:400px;
background-color:blue;
color:white;
}
正如您在此处看到的那样,它现在不会发生
我通过替换解决了这个400-
问题four
。于是就变成了fourwidth
。