1
我試圖顯示3個盒子內嵌對方的所有等寬,然後隨着頁面變小而變小,然後當它變得對於所有3個盒子太小,對於它們全部顯示彼此之間100%寬度。顯示3盒內嵌響應式CSS
撥弄全碼:http://jsfiddle.net/tBX6H/
CSS
.cont {
width:80%;
margin:0 auto 0 auto;
}
.box-container {
width:100%;
padding:5px;
}
.icon-box {
margin-left: 45px;
width:33%;
display:inline;
float:left;
}
HTML
<div class="cont">
<!-- Icon Box Container -->
<div class="box-container">
<div class="icon-box">
<h4>BOX</h4>
<p>content here</p>
</div>
<div class="icon-box">
<h4>BOX</h4>
<p>content here</p>
</div>
<div class="icon-box">
<h4>BOX</h4>
<p>content here</p>
</div>
<br class="clearfloat">
<div class="icon-box">
<h4>BOX</h4>
<p>content here</p>
</div>
<div class="icon-box">
<h4>BOX</h4>
<p>content here</p>
</div>
<div class="icon-box">
<h4>BOX</h4>
<p>content here</p>
</div>
</div><!-- cont -->