我试图像这样清除页脚:
<div>
<div class="left">Left</div>
<div class="right">Right</div>
<div class="footer clear">Footer</div>
<div>
Run Code Online (Sandbox Code Playgroud)
.left {
background-color: red;
float: left;
}
.right {
background-color: blue;
float: right;
}
.footer {
background-color: orange;
}
// clear
.clear {
clear: both;
}
Run Code Online (Sandbox Code Playgroud)
在这里小提琴:http://jsfiddle.net/RYYFw/8/
但是页脚没有清除.有谁知道为什么?
这是你的评论//导致错误.它不允许在CSS中使用.
使用 /* comment */
| 归档时间: |
|
| 查看次数: |
167 次 |
| 最近记录: |