- 用margin属性隔开,话不多说,请看代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
*{
padding: 0;
margin: 0;
}
.box{
width: 1000px;
border: 1px solid #CCCCCC;
margin: 0 auto;
}
.box-list{
width: 100%;
height: 100%;
display: flex;
flex-flow: wrap;
}
ul.box-list>li{
width: 200px;
height: 250px;
border: 1px solid red;
border-radius: 10px;
list-style: none;
margin-left: 39px;
margin-top: 30px;
}
</style>
</head>
<body>
<div class="box">
<ul class="box-list">
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
<li>10</li>
</ul>
</div>
</body>
</html>
- 效果图如下: