<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>浮动布局</title>
<style>
.box {
width: 1226px;
height: 615px;
background-color: steelblue;
margin: 0 auto;
}
.left {
float: left;
width: 234px;
height: 615px;
background-color: rgb(156, 206, 247);
margin: 0 auto;
}
.right {
float: left;
width: 992px;
height: 615px;
background-color: cornsilk;
}
.right>div {
float: left;
width: 234px;
height: 300px;
background-color: rgb(115, 218, 221);
margin-left: 14px;
margin-bottom: 14px;
}
</style>
</head>
<body>
<div class="box">
<div class="left">陈哈哈</div>
<div class="right">
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>6</div>
<div>7</div>
<div>8</div>
</div>
</div>
</body>
</html>
前端 盒子浮动布局
猜你喜欢
转载自blog.csdn.net/qq_55061257/article/details/119088294
今日推荐
周排行