Yeqela kokuqukethwe okuyinhloko Yeqela ku-docs navigation
in English

Izithombe

Amadokhumenti nezibonelo zokukhetha izithombe ekuziphatheni okuphendulayo (ukuze zingabi banzi kunomzali wazo) futhi wengeze izitayela ezingasindi kuzo—konke ngamakilasi.

Izithombe eziphendulayo

Izithombe ku-Bootstrap zenziwa ziphendule nge- .img-fluid. Lokhu kuyasebenza max-width: 100%;nasesithombeni height: auto;ukuze silinganise ngobubanzi bomzali.

Placeholder Responsive image
<img src="..." class="img-fluid" alt="...">

Izithonjana zesithombe

Ngokungeziwe kuzinsiza zethu zerediyasi yomngcele , ungasebenzisa .img-thumbnailukunikeza isithombe ukubukeka komngcele oyindilinga ongu-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="...">

Ukuqondanisa izithombe

Qondanisa izithombe namakilasi okuntanta komsizi noma amakilasi okuqondanisa umbhalo . block-Izithombe ezisezingeni zingagxiliswa kusetshenziswa isigaba sensiza ye- .mx-automargin .

Placeholder 200x200 Placeholder 200x200
<img src="..." class="rounded float-start" alt="...">
<img src="..." class="rounded float-end" alt="...">
Placeholder 200x200
<img src="..." class="rounded mx-auto d-block" alt="...">
Placeholder 200x200
<div class="text-center">
  <img src="..." class="rounded" alt="...">
</div>

Isithombe

Uma usebenzisa i- <picture>elementi ukuze ucacise <source>izici eziningi zento ethile <img>, qiniseka ukuthi ungeza .img-*amakilasi kokuthi <img>hhayi <picture>kumaka.

<picture>
  <source srcset="..." type="image/svg+xml">
  <img src="..." class="img-fluid img-thumbnail" alt="...">
</picture>

Sass

Okuguquguqukayo

Okuguquguqukayo kuyatholakala ezithonjaneni zesithombe.

$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;