"
<style>
.container{
margin: 10px 20px;
height: auto;
overflow: hidden;
}
.box{
box-sizing:border-box;
-moz-box-sizing:border-box; /* Firefox /
-webkit-box-sizing:border-box; / Safari */
width:50%;
float: left;
height: 80px;
margin-bottom: 10px;
background: #fff;
border-top: 5px solid #004389;
text-align: center;
}
</style>
<p class="container">
<p class="box">
<a href="" class="post">产品经理</a>
<span>广州</span>
<span class="salary">10k-15k</span>
</p>
<p class="box">
<a href="" class="post">产品经理</a>
<span>广州</span>
<span class="salary">10k-15k</span>
</p>
</p>
``
想实现两个并排的容器中有一定的间隔,并且浏览器宽度改变时,间隔宽度不变
Just set the margin value, but the width needs to be adjusted slightly
。。。。。。。。。。。
margin outer border padding.
Easy to set transparent border
Or just apply another layer and use whatever you want
If you want to achieve a uniform spacing effect in the overall layout, it is recommended that you use CSS3’s flexible box layout (box-flex)