1、小米官网布局1
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/938ee86634447b0e4be18efe502a5af4.png)
<!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>Document</title>
<style>
.box{
width: 1200px;
height: 460px;
background-color: green;
margin: 0 auto;
}
.left{
width: 230px;
height: 100%;
background-color: pink;
float: left;
}
.right{
width: 970px;
height: 100%;
background-color: black;
float: left;
}
</style>
</head>
<body>
<div class="box">
<div class="left">左</div>
<div class="right">右</div>
</div>
</body>
</html>
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/1801746b3e4d3a11098e9a8086c0f837.png)
2、小米官网布局2
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/bed6d546dceeccf7bb9e593d351633c9.png)
<!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>Document</title>
<style>
*{
margin: 0;
padding: 0;
}
li{
list-style: none;
}
.box{
width: 1226px;
height: 285px;
background-color: pink;
margin: 0 auto;
}
.box li{
width: 296px;
height: 100%;
background-color: skyblue;
float: left;
margin-right: 14px;
}
.box .last{
margin-right: 0;
}
</style>
</head>
<body>
<div class="box">
<li>1</li>
<li>2</li>
<li>3</li>
<li class="last">4</li>
</div>
</body>
</html>
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/c011ff8039f0ef086e0d735ab813d693.png)
3.小米官网布局3
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/1aa79cfb5b81963ee5ccf179977539fc.png)
<!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>Document</title>
<style>
.box{
width: 1226px;
height: 615px;
background-color: antiquewhite;
margin: 0 auto;
}
.left{
width: 234px;
height: 100%;
background-color: green;
float: left;
}
.right{
width: 992px;
height: 100%;
background-color: skyblue;
float: left;
}
.right>div{
width: 234px;
height: 300px;
background-color: pink;
float: left;
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>
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/70bf86cf325bd30795b1071104178980.png)
4、常见网页布局
<!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>Document</title>
<style>
*{
margin: 0;
padding: 0;
}
li{
list-style: none;
}
.top{
height: 50px;
width: 100%;
background-color: green;
}
.banner{
width: 900px;
height: 100px;
background-color: green;
margin: 20px auto;
}
.box{
width: 900px;
height: 200px;
margin: 10px auto;
background-color: green;
}
.box li{
width: 220px;
height: 200px;
margin-right: 5px;
background-color: skyblue;
float: left;
}
.box li_last{
margin-right: 0;
}
.footer{
height: 200px;
background-color: green;
}
</style>
</head>
<body>
<div class="top"></div>
<div class="banner"></div>
<div class="box">
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li class="li_last">4</li>
</ul>
</div>
<div class="mid2"></div>
<div class="footer"></div>
</body>
</html>
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/4c29bc9edad18c9ad00a303936f66847.png)