ブートストラップCSSイメージリファレンス
ブートストラップ画像
丸い角:
丸:
サムネイル:
<img>クラス
以下のクラスを使用して、任意の画像のスタイルを設定できます。
Class | Description | Example |
---|---|---|
.img-rounded | Adds rounded corners to an image (not available in IE8) | |
.img-circle | Shapes the image to a circle (not available in IE8) | |
.img-thumbnail | Shapes the image to a thumbnail | |
.img-responsive | Makes an image responsive (will scale nicely to the parent element) |
レスポンシブ画像
タグに.img-responsive
クラスを追加して、レスポンシブ画像を作成します。<img>
その後、画像は親要素に合わせて適切に拡大縮小されます。
.img-responsive
クラスは、、、max-width: 100%
およびheight: auto
をdisplay:block
画像に適用します。
例
<img src="cinqueterre.jpg" class="img-responsive" alt="Cinque Terre">