Lumpat menyang isi utama Lumpat menyang pandhu arah docs
in English

Gambar

Dokumentasi lan conto kanggo milih gambar menyang prilaku responsif (supaya padha ora dadi luwih gedhe tinimbang unsur induk) lan nambah gaya entheng kanggo wong-kabeh liwat kelas.

Gambar responsif

Gambar ing Bootstrap digawe responsif karo .img-fluid. Iki ditrapake max-width: 100%;lan height: auto;kanggo gambar supaya timbangan karo unsur induk.

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

Gambar cilik gambar

Saliyane utilitas radius wewatesan , sampeyan bisa nggunakake .img-thumbnailkanggo menehi gambar tampilan wewatesan 1px sing dibunderaké.

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="...">

Nyelarasake gambar

Selarasake gambar karo kelas helper float utawa kelas alignment teks . block-gambar tingkat bisa dipusatake nggunakake kelas .mx-autosarana margin .

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>

Gambar

Yen sampeyan nggunakake <picture>unsur kanggo nemtokake macem -macem <source>unsur kanggo tartamtu <img>, priksa manawa kanggo nambah .img-*kelas kanggo <img>lan ora kanggo <picture>tag.

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

Sass

Variabel

Variabel kasedhiya kanggo gambar cilik gambar.

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