in English

Ukushumeka

Dala ividiyo ephendulayo noma ukushumeka kombukiso wesilayidi ngokusekelwe kububanzi bomzali ngokudala isilinganiso sangaphakathi esikala kunoma iyiphi idivayisi.

Mayelana

Imithetho isetshenziswa ngokuqondile ku- <iframe>, <embed>, <video>, <object>nezici; ngokuzikhethela sebenzisa isigaba sozalo esicacile .embed-responsive-itemuma ufuna ukufanisa isitayela sezinye izici.

I-Pro-Tip! Awudingi ukufaka phakathi frameborder="0"kwakho <iframe>njengoba sikuhoxisa lokho.

Isibonelo

Goqa noma yikuphi ukushumeka njengento <iframe>engumzali kanye .embed-responsivene-aspect ratio. .embed-responsive-itemAkudingekile ngokuqinile, kodwa siyakukhuthaza .

<div class="embed-responsive embed-responsive-16by9">
  <iframe class="embed-responsive-item" src="https://www.youtube.com/embed/zpOULjyy-n8?rel=0" allowfullscreen></iframe>
</div>

Ukubukeka kwezilinganiso

Ukubukeka kwezilinganiso kungenziwa ngendlela oyifisayo ngamakilasi okulungisa. Ngokuzenzakalelayo amakilasi esilinganiso alandelayo anikeziwe:

<!-- 21:9 aspect ratio -->
<div class="embed-responsive embed-responsive-21by9">
  <iframe class="embed-responsive-item" src="..."></iframe>
</div>

<!-- 16:9 aspect ratio -->
<div class="embed-responsive embed-responsive-16by9">
  <iframe class="embed-responsive-item" src="..."></iframe>
</div>

<!-- 4:3 aspect ratio -->
<div class="embed-responsive embed-responsive-4by3">
  <iframe class="embed-responsive-item" src="..."></iframe>
</div>

<!-- 1:1 aspect ratio -->
<div class="embed-responsive embed-responsive-1by1">
  <iframe class="embed-responsive-item" src="..."></iframe>
</div>

Ngaphakathi _variables.scss, ungashintsha i-aspect ratios ofuna ukuyisebenzisa. Nasi isibonelo $embed-responsive-aspect-ratiossohlu:

$embed-responsive-aspect-ratios: (
  (21 9),
  (16 9),
  (4 3),
  (1 1)
) !default;