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 ʻia me ka mea makua.
<img src="..." class="img-fluid" alt="...">
Nā kiʻi SVG a me Internet Explorer
Ma Internet Explorer 10 a me 11, ʻokoʻa ka nui o nā kiʻi SVG me .img-fluid
. No ka hoʻoponopono ʻana i kēia, hoʻohui a i width: 100%;
ʻole .w-100
inā pono. ʻAʻole hoʻohana ʻokoʻa ʻo Bootstrap i nā ʻano kiʻi ʻē aʻe.
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-thumbnail
e hāʻawi i kahi kiʻi i kahi hiʻohiʻona pōʻai palena 1px.
<img src="..." class="img-thumbnail" alt="...">
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 . block
Hiki ke hoʻohālikelike ʻia nā kiʻi pae me ka hoʻohana ʻana i ka .mx-auto
papa hana margin .
<img src="..." class="rounded float-left" alt="...">
<img src="..." class="rounded float-right" alt="...">
<img src="..." class="rounded mx-auto d-block" alt="...">
<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>