简单的小米页面布局,希望能帮助正在自学的你!
效果图如上所示!
代码入下!
<head>
<meta charset="UTF-8">
<title>小米盒子加强版</title>
<style>
.box {
width: 1160px;
height: 515px;
margin: 10px auto;
}
.left {
float:left;
width: 300px;
height: 515px;
background-color: skyblue;
}
.right {
float:left;
width: 860px;
height: 515px;
background-color:#f5f5f5;
}
.right>div {
width: 200px;
height: 250px;
background-color:#eeeddd;
float:left;
margin: 0 0 15px 15px;
}
</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>