2016-11-16 21 views

回答

1

如何在每个盒子的底部和右侧应用边距。

body { 
 
    display: flex; 
 
    justify-content: center; 
 
} 
 
.container { 
 
    width: 600px; 
 
    height: 400px; 
 
    background: #e9e9e9; 
 
    display: flex; 
 
    flex-flow: row wrap; 
 
    padding: 10px 0 0 10px; 
 
} 
 
.container div { 
 
    background: #a3a3a3; 
 
    width: 125px; 
 
    height: 125px; 
 
    margin: 0 10px 10px 0; 
 
}
<div class="container"> 
 
    <div></div> 
 
    <div></div> 
 
    <div></div> 
 
    <div></div> 
 
    <div></div> 
 
</div>

相关问题