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
. Izi zikugwira ntchito max-width: 100%;
ndi height: auto;
chithunzicho kuti chikhale ndi gawo la makolo.
<img src="..." class="img-fluid" alt="...">
Tizithunzi tazithunzi
Kuphatikiza pazida zathu zam'malire , mutha kugwiritsa ntchito .img-thumbnail
kuti chithunzichi chiwoneke mozungulira 1px.
<img src="..." class="img-thumbnail" alt="...">
Kuyanjanitsa zithunzi
Gwirizanitsani zithunzi ndi makalasi oyandama othandizira kapena makalasi oyika mawu . block
-Zithunzi zamtundu zitha kukhazikitsidwa pogwiritsa ntchito kalasi yogwiritsira ntchito .mx-auto
m'mphepete .
<img src="..." class="rounded float-start" alt="...">
<img src="..." class="rounded float-end" alt="...">
<img src="..." class="rounded mx-auto d-block" alt="...">
<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>
Sass
Zosintha
Zosintha zilipo pazithunzi zazithunzi.
$thumbnail-padding: .25rem;
$thumbnail-bg: $body-bg;
$thumbnail-border-width: $border-width;
$thumbnail-border-color: $gray-300;
$thumbnail-border-radius: $border-radius;
$thumbnail-box-shadow: $box-shadow-sm;