我是新的Bootstrap,我試圖做到這一點:一個div,3圖像居中(圖像顯示:內聯塊性能)。響應式圖像inline-block與div的div bootstrap
但是,當我開始調整大小,在sm設備中,第三個圖像跳轉到一個新行。在這種情況下,我希望這三張圖片是有反應的,但有些不起作用。我的HTML代碼:
<div class="row">
<div id="small-img" class="col-xs-12 col-sm-12 col-md-12 col-lg-12 center">
<img src="img/img1.jpg" class="img-responsive inline-block" alt="Responsive image"/>
<img src="img/img2.jpg" class="img-responsive inline-block" alt="Responsive image"/>
<img src="img/img3.jpg" class="img-responsive inline-block" alt="Responsive image"/>
</div>
</div>
CSS:
.inline-block{ display: inline-block; }
.center{ text-align: center; }
任何建議嗎?
爲什麼呢? – Tom
@寬度:100%比最大寬度:100%更易於控制。也是這個問題https://github.com/twbs/bootstrap/issues/10690 –