in English

Amashusho

Inyandiko n'ingero zo guhitamo amashusho mumyitwarire yitabiriwe (ntabwo rero iba nini kuruta ibintu byababyeyi) kandi ikongeramo uburyo bworoshye kuri bo - byose binyuze mumasomo.

Amashusho asubiza

Amashusho muri Bootstrap yakozwe neza hamwe .img-fluid. max-width: 100%;kandi height: auto;bikoreshwa kumashusho kuburyo bipima nibintu byababyeyi.

Placeholder Responsive image
<img src="..." class="img-fluid" alt="...">
SVG amashusho na Internet Explorer

Muri Internet Explorer 10 na 11, amashusho ya SVG hamwe .img-fluidnubunini butagereranywa. Kugira ngo ukosore ibi, ongeraho width: 100%;cyangwa .w-100aho bikenewe. Ukosora gukosora muburyo butandukanye muburyo bwimiterere yishusho, Bootstrap rero ntabwo iyikoresha mu buryo bwikora.

Igishusho

Usibye imipaka yacu-radiyo yingirakamaro , urashobora gukoresha .img-thumbnailgutanga ishusho izengurutse umupaka 1px.

A generic square placeholder image with a white border around it, making it resemble a photograph taken with an old instant camera 200x200
<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-autoyingirakamaro .

Placeholder 200x200 Placeholder 200x200
<img src="..." class="rounded float-left" alt="...">
<img src="..." class="rounded float-right" alt="...">
Placeholder 200x200
<img src="..." class="rounded mx-auto d-block" alt="...">
Placeholder 200x200
<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>