以下是您所要求的设计。复制下面的代码粘贴,并根据您的需要调整其他东西。
<div class="row">
<div class="col-md-12 heading" style="background-color:#ff4940;height:74px;">
<h2>Some text</h2>
</div>
</div>
<div class="blue-cirle-div">
<h5 class="text-center">NY</h5>
</div>
<div class="row">
<div class="col-md-12 middle" style="background-color:cyan;height:74px;">
</div>
</div>
<div class="box-container">
<div class="box"></div>
<div class="box"></div>
</div>
</body>
CSS这里 -
body{
overflow-x:hidden;
}
.heading{
display: flex;
justify-content: center;
align-items: center;
}
h2{
color:white;
}
.blue-cirle-div{
background: none repeat scroll 0 0 #fff;
box-shadow:0 2px 5px rgba(0,0,0,0.16);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
height: 50px;
width:50px;
left: 50%;
margin: 0 auto;
position: absolute;
text-align: center;
top: 60px;
vertical-align: middle;
z-index:1;
}
.middle{
margin-top:12px;
}
.box-container{
display:flex;
justify-content:center;
align-self:center;
width:100%;
}
.box{
display: flex;
justify-content:center;
align-self:center;
float:left;
box-shadow:0 2px 5px rgba(0,0,0,0.16);
margin: 0 15px;
width:200px;
height:200px;
position:relative;
top:-45px;
background:lightblue;
}
如果有任何发布的答案解决了您的问题,请接受它,如果没有,请告诉我们,我们可以为您找到一个 – LGSon