<div class="maininfo">
<div class="large">2</div>
<div class="smallblock">
<div class="smalltop">3</div>
<div class="small">4</div>
</div>
<div class="smallblock">
<div class="smalltop">5</div>
<div class="small">6</div>
</div>
</div>
.maininfo {
width: 600px;
}
.large {
float: left;
height: 95px;
background-color: blue;
width:auto;
}
.smallblock {
float: right;
height: 90px;
margin: 0 0 0 5px;
width: 20%;
}
.small {
background-color: red;
height: 50%;
width: 100%;
}
.smalltop {
background-color: red;
height: 50%;
width: 100%;
margin-bottom:5px;
}
更新我的JFIDDLE但现在它制造了2条线:http://jsfiddle.net/4ykf5frk/11/
答案 0 :(得分:1)
如果只是.maininfo,只需添加'background:blue;'属性风格声明:
.maininfo {
background-color: blue;
width: 600px;
}
否则,只需添加'背景:蓝色;' 'body'元素的属性:
body {
background-color: blue;
}