Ahm*_*med 0 html css css-selectors
为什么你不能在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>
Run Code Online (Sandbox Code Playgroud)
CSS选择类400-width
,这意味着容器的宽度为400px
.这background-color
是为了检查它是否属实.
.400-width{
width:400px;
background-color:blue;
color:white;
}
Run Code Online (Sandbox Code Playgroud)
它现在不会发生,你可以在这里看到
我通过替换400-
来解决问题four
.所以它变成了fourwidth
.
归档时间: |
|
查看次数: |
2353 次 |
最近记录: |