redam
2020-01-03 17:17:08 +08:00
这样?
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
* {
margin: 0;
padding: 0;
}
html,body {
height: 100%;
}
.side-bar {
float: left;
width: 100px;
height: 100%;
background: #000;
}
.list {
box-sizing: border-box;
margin-left: 100px;
padding-left: 20px;
padding-right: 20px;
overflow: hidden;
}
.item-wrap {
float: left;
width: calc(100% / 3);
text-align: center;
}
.item {
display: inline-block;
width: 70px;
height: 70px;
background: red;
}
</style>
</head>
<body>
<div class="side-bar"></div>
<div class="list">
<div class="item-wrap">
<div class="item"></div>
</div>
<div class="item-wrap">
<div class="item"></div>
</div>
<div class="item-wrap">
<div class="item"></div>
</div>
<div class="item-wrap">
<div class="item"></div>
</div>
</div>
</body>
</html>