你沒有說你想要的東西要在更小的視口來完成。因爲內容不能很小而不能在一個小的視口上看起來不太好,所以它在這裏疊加和聚焦。
DEMO:http://jsbin.com/duveli/1/
CSS:
body {
background: #777;
padding: 5% 0;
}
.feature {background:pink;padding:10% 0}
.circle .btn {
border-radius: 40px;
background: #000;
border: #000;
}
.circle {
width: 100%;
padding: 10%;
background: white;
border-radius: 50px;
}
.circle-wrapper {
margin: 0 5%;
position: relative;
}
.circle .list-inline {
font-size: 0px;
margin: 0;
}
.circle .list-inline li {
font-size: 20px;
display: block;
}
.circle p {
padding-top: 10%;
margin: 0;
}
@media (min-width:460px) {
.circle .list-inline li {
font-size: 50px;
display: inline-block;
}
.circle-wrapper {
max-width: 450px;
position: relative;
margin:0 auto;
}
.circle {
height: 0px;
padding: 50%;
border-radius: 50%;
}
.circle > div {
position: absolute;
text-align: center;
left: 10%;
right: 10%;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
top:20%\9; /* ie8 hack test this out it's a guess */
}
}
HTML:
<section class="feature">
<div class="circle-wrapper">
<div class="circle text-center">
<div>
<ul class="list-inline">
<li><img src="http://placehold.it/100x100/OOO/FFFFFF&text=image+1" alt=""></li>
<li class="plus">+</li>
<li><img src="http://placehold.it/100x100/OOO/FFFFFF&text=image+2" alt=""></li>
</ul>
<p>content goes herecontent goes herecontent goes herecontent goes herecontent goes herecontent goes herecontent goes herecontent goes here goes herecontent goes herecontent goes here</p>
<p><a href="#" class="btn btn-primary">Button Goes Here</a></p>
</div>
</div>
</div>
</section>
+1解決較小的視口。謝謝! – Anconia 2014-10-17 15:45:40