Source

Zithunzi

Zolemba ndi zitsanzo zosankhira zithunzi kukhala zomvera (kuti zisakhale zazikulu kuposa makolo awo) ndikuwonjezera masitayelo opepuka kwa iwo - zonse kudzera m'makalasi.

Zithunzi zomvera

Zithunzi mu Bootstrap zimapangidwa kuti zigwirizane ndi .img-fluid. max-width: 100%;ndipo height: auto;amagwiritsidwa ntchito pa chithunzicho kuti chikhale ndi gawo la makolo.

100%x250
<img src="..." class="img-fluid" alt="Responsive image">
Zithunzi za SVG ndi IE 10

Mu Internet Explorer 10, zithunzi za SVG zomwe .img-fluidzili ndi kukula kwake ndizosafanana. Kuti mukonze izi, onjezerani width: 100% \9;ngati kuli kofunikira. Kukonzekera uku kumakulitsa molakwika mawonekedwe ena azithunzi, kotero Bootstrap siigwiritsa ntchito yokha.

Tizithunzi tazithunzi

Kuphatikiza pazida zathu zam'malire , mutha kugwiritsa ntchito .img-thumbnailkuti chithunzichi chiwoneke mozungulira 1px.

200x200
<img src="..." alt="..." class="img-thumbnail">

Kuyanjanitsa zithunzi

Gwirizanitsani zithunzi ndi makalasi oyandama othandizira kapena makalasi oyika mawu . block-Zithunzi zamtundu zitha kukhazikitsidwa pogwiritsa ntchito kalasi yogwiritsira ntchito .mx-autom'mphepete .

200x200 200x200
<img src="..." class="rounded float-left" alt="...">
<img src="..." class="rounded float-right" alt="...">
200x200
<img src="..." class="rounded mx-auto d-block" alt="...">
200x200
<div class="text-center">
  <img src="..." class="rounded" alt="...">
</div>

Chithunzi

Ngati mukugwiritsa ntchito <picture>chinthuchi kuti mutchule zinthu zingapo zamtundu <source>wina <img>, onetsetsani kuti mwawonjezera .img-*makalasiwo <img>osati pa <picture>tag.

<picture>
  <source srcset="..." type="image/svg+xml">
  <img src="..." class="img-fluid img-thumbnail" alt="...">
</picture>