Bootstrap中的圖像響應 .img-fluidui
圖像會隨着父元素一塊兒縮放spa
使用.img-thumbnail
爲圖像提供圓形1px邊框外觀3d
div中的img標籤使用了float-leftcode
此時p元素在div的外面blog
可是卻在頁面中浮動上去了圖片
此時必須在其外層div補上清除浮動rem
這樣div內的排版不會對其餘部分形成影響 而形成跑版問題it
任什麼時候候你須要顯示一段內容 - 如帶有可選標題的圖像,請考慮使用<figure>
。io
使用附帶的.figure
,.figure-img
以及.figure-caption
類爲HTML5的<figure>
和<figcaption>
元素提供了一些基線的風格 class
請務必將該.img-fluid
類添加到您的內容中<img>
以使其具備響應性
<figure class="figure"> <img class="img-fluid rounded figure-img" width="900px" src="綠色樹林3440x1440風景壁紙_彼岸圖網.jpg" alt="A generic square placeholder image with rounded corners in a figure."> <figcaption class="figure-caption">A caption for the above image.</figcaption> </figure>