我将尝试在内容的两侧以外实现填充效果。这是我的代码:
我从这里得到了滚动条。我做错了什么?为什么它会出现?
http://jsfiddle.net/3tbovz0f/1/
CSS:.col1 .fill {
background: red;
}
.col2 .fill {
background: blue;
}
.col {
width: 50%;
float: left;
}
.pd {
padding: 10px;
}
.row {
margin: -10px;
}
.fill {
height: 30px;
}
HTML:
<div class="row">
<div class="col col1">
<div class="pd">
<div class="fill"></div>
</div>
</div>
<div class="col col2">
<div class="pd">
<div class="fill"></div>
</div>
</div>
</div>
我从这里得到了滚动条。我做错了什么?为什么它会出现?