Amashusho
Inyandiko n'ingero zo guhitamo amashusho mumyitwarire yitabira (kuburyo batigera baguka kuruta ababyeyi babo) hanyuma bakongeramo uburyo bworoshye kuri bo - byose binyuze mumasomo.
Amashusho asubiza
Amashusho muri Bootstrap yakozwe neza hamwe .img-fluid
. Ibi birakurikizwa max-width: 100%;
no height: auto;
kubishusho kuburyo bipima ubugari bwababyeyi.
<img src="..." class="img-fluid" alt="...">
Igishusho
Usibye imipaka yacu-radiyo yingirakamaro , urashobora gukoresha .img-thumbnail
gutanga ishusho izengurutse umupaka 1px.
<img src="..." class="img-thumbnail" alt="...">
Guhuza amashusho
Huza amashusho hamwe nabafasha kureremba ibyiciro cyangwa amasomo yo guhuza inyandiko . block
-amashusho meza arashobora gushimangirwa ukoresheje margin .mx-auto
yingirakamaro .
<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>
Ishusho
Niba ukoresha ikintu <picture>
kugirango ugaragaze <source>
ibintu byinshi kubintu byihariye <img>
, menya neza ko wongera .img-*
amasomo kuri i <img>
ntabwo ari kuri <picture>
tagi.
<picture>
<source srcset="..." type="image/svg+xml">
<img src="..." class="img-fluid img-thumbnail" alt="...">
</picture>
Sass
Ibihinduka
Ibihinduka birahari kubishusho bito.
$thumbnail-padding: .25rem;
$thumbnail-bg: $body-bg;
$thumbnail-border-width: $border-width;
$thumbnail-border-color: var(--#{$prefix}border-color);
$thumbnail-border-radius: $border-radius;
$thumbnail-box-shadow: $box-shadow-sm;