1 回答
TA贡献10条经验 获得超3个赞
我也刚学前端不久 这个方法简单但是可以实现
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>image</title>
<style>
.div0{
width: 1000px;
margin: 0 auto;
}
.div1{
width: 100%;
height: 40px;
background-color: red;
}
.div2{
margin-top: 5px;
float: left;
width: 51%;
height: 40px;
background-color: blue;
}
.div3{
float: right;
width: 40%;
height: 160px;
background-color: black;
margin-top: -265px;
}
</style>
</head>
<body>
<div class="div0">
<div class="div1"></div>
<div class="div2"></div>
<div class="div2"></div>
<div class="div2"></div>
<div class="div2"></div>
<div class="div2"></div>
<div class="div3"></div>
</div>
</body>
</html>
- 1 回答
- 2 关注
- 1161 浏览
添加回答
举报