Source

Nā kiʻi

Nā palapala a me nā laʻana no ke koho ʻana i nā kiʻi i ke ʻano pane (no laila ʻaʻole lākou e lilo i mea nui ma mua o ko lākou mau mea makua) a hoʻohui i nā ʻano māmā iā lākou-ma nā papa āpau.

Nā kiʻi pane

Hoʻopili ʻia nā kiʻi ma Bootstrap me .img-fluid. max-width: 100%;a height: auto;hoʻohana ʻia i ke kiʻi i mea unahi me ka mea makua.

100%x250
<img src="..." class="img-fluid" alt="Responsive image">
Nā kiʻi SVG a me IE 10

Ma Internet Explorer 10, ʻokoʻa ka nui o nā kiʻi SVG me .img-fluid. No ka hoʻoponopono i kēia, hoʻohui i width: 100% \9;kahi e pono ai. Hoʻopili pono kēia hoʻoponopono i nā ʻano kiʻi ʻē aʻe, no laila ʻaʻole pili ʻo Bootstrap iā ia.

Nā kiʻi liʻiliʻi kiʻi

Ma waho aʻe o kā mākou mau pono palena-radius , hiki iā ʻoe ke hoʻohana .img-thumbnaile hāʻawi i kahi kiʻi i kahi hiʻohiʻona pōʻai palena 1px.

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

Hoʻopololei i nā kiʻi

Hoʻopololei i nā kiʻi me nā papa lana kōkua a i ʻole nā ​​papa hoʻoponopono kikokikona . blockHiki ke hoʻohālikelike ʻia nā kiʻi pae me ka hoʻohana ʻana i ka .mx-autopapa hana margin .

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>

Kiʻi

Inā ʻoe e hoʻohana ana i ka <picture>mea e wehewehe i nā <source>mea he nui no kahi kikoʻī <img>, e hōʻoia e hoʻohui i nā .img-*papa i ka <img>a ʻaʻole i ka <picture>tag.

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