代码如下
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
.class1{
width: 500px;
height: 100px;
background-color: #0000FF;
}
.class2{
width: 300px;
height: 100px;
background-color: #000000;
float: left;
}
.class3{
width: 200px;
height: 100px;
background-color: #008000;
float: left;
}
.class4{
width: 500px;
height: 100px;
background-color: yellow;
/*float: left;*/
}
.class5{
width: 150px;
height: 100px;
background-color: #8A2BE2;
float: left;
}
.class6{
width: 150px;
height: 100px;
background-color: aqua;
float: left;
}
.class7{
width: 150px;
height: 100px;
background-color: red;
float: left;
}
.class8{
width: 150px;
height: 100px;
background-color: darkgoldenrod;
float: left;
}
.class9{
width: 200px;
height: 200px;
background-color: firebrick;
float: left;
}
.class10{
width: 500px;
height: 100px;
background-color: gold;
/*float: left;*/
}
.vol1{
width: 500px;
height: 100px;
}
.vol2{
width: 300;
height: 100;
}
.clear{
clear: both;
}
.vol3{
width: 300;
height: 200;
float: left;
}
.vol4{
width: 500px;
height: 200px;
}
</style>
</head>
<body>
<div class="class1">qwe</div>
<div class="vol1">
<div class="class2">qwe</div>
<div class="class3">asd</div>
</div>
<div class="class4">4</div>
<div class="vol4">
<div class="vol3">
<div class="vol2">
<div class="class5">z5c</div>
<div class="class6">z6c</div>
</div>
<div class="vol2">
<div class="class7">777777777</div>
<div class="class8">888</div>
</div>
</div>
<div class="class9"> 999</div>
<!--<div class="clear"></div>-->
</div>
<div class="class10">10c</div>
</body>
</html>
结果如下
image.png
网友评论