Source

Swifaniso

Matsalwa na swikombiso swo hlawula swifaniso eka mahanyelo yo hlamula (leswaku swi nga tshuki swi va swikulu ku tlula swiaki swa swona swa vatswari) na ku engetela switayele swo olova eka swona—hinkwaswo hi ku tirhisa titlilasi.

Swifaniso leswi hlamulaka

Swifaniso eka Bootstrap swi endliwa swi hlamula hi .img-fluid. max-width: 100%;naswona height: auto;ti tirhisiwa eka xifaniso leswaku xi ringanisa hi xiaki xa mutswari.

100%x250 yi va kona
<img src="..." class="img-fluid" alt="Responsive image">
Swifaniso swa SVG na IE 10

Eka Internet Explorer 10, swifaniso swa SVG leswi .img-fluidnga ni vukulu lebyi nga ringaniki. Leswaku u lulamisa leswi, engetela width: 100% \9;laha swi lavekaka kona. Ku lulamisiwa loku ku ringanisa tifomati tin’wana ta swifaniso hi ndlela leyi nga fanelangiki, hikwalaho Bootstrap a yi swi tirhisi hi ku tisungulela.

Swifaniso leswitsongo swa swifaniso

Ku engetela eka switirhisiwa swa hina swa border-radius , u nga tirhisa .img-thumbnailku nyika xifaniso xivumbeko xa ndzilakano xa xirhendzevutana xa 1px.

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

Ku ringanisa swifaniso

Hlanganisa swifaniso na titlilasi ta float ta mupfuni kumbe titlilasi ta ku ringanisa matsalwa . blockswifaniso swa xiyimo xa le henhla swi nga vekiwa exikarhi hi ku tirhisa tlilasi ya .mx-autovukorhokeri bya margin .

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

Xifaniso

Loko u tirhisa <picture>elemente ku boxa <source>swiaki swo tala swa specific <img>, tiyisisa leswaku u engetela .img-*titlilasi eka <img>na ku nga ri eka <picture>thegi.

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