Ata
Faʻamaumauga ma faʻataʻitaʻiga mo le filifilia o ata i amioga tali (ina ia le sili atu nai lo o latou matua elemene) ma faʻaopoopo sitaili mama ia i latou-e ala uma i vasega.
Ata tali
O ata i Bootstrap e faʻafeiloaʻi ma .img-fluid
. E fa'atatau lea max-width: 100%;
ma height: auto;
i le ata ina ia fua ma le elemene matua.
<img src="..." class="img-fluid" alt="...">
Ata laititi
I le faaopoopo atu i la matou tuaoi-radius utilities , e mafai ona e faʻaogaina .img-thumbnail
e tuʻuina atu ai se ata se foliga lapotopoto 1px tuaoi.
<img src="..." class="img-thumbnail" alt="...">
Fa'aoga ata
Fa'aoga ata ma vasega fa'anofo fesoasoani po'o vasega fa'aoga o tusitusiga . block
-o ata maualuga e mafai ona fa'atotonugalemu i le fa'aogaina o le fa'aogaina o le .mx-auto
va'aiga fa'apitoa .
<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>
Ata
Afai o loʻo e faʻaaogaina le <picture>
elemene e faʻamaonia ai le tele o <source>
elemene mo se mea patino <img>
, ia mautinoa e faʻaopoopo .img-*
vasega i le <img>
ae le o le <picture>
pine.
<picture>
<source srcset="..." type="image/svg+xml">
<img src="..." class="img-fluid img-thumbnail" alt="...">
</picture>
Sass
Fuafuaga
O lo'o avanoa suiga mo ata.
$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;