Embeds
Yenza ividiyo ephendulayo okanye umboniso wesilayidi usekwe kububanzi bomzali ngokwenza umlinganiselo ongaphakathi okala kuso nasiphi na isixhobo.
Malunga
Imigaqo isetyenziswa ngokuthe ngqo kwi <iframe>
, <embed>
, <video>
, kunye <object>
neziqalelo; ngokuzikhethela sebenzisa udidi lomzukulwana olucacileyo .embed-responsive-item
xa ufuna ukuthelekisa isimbo sezinye iimpawu.
Pro-Tip! Awudingi ukubandakanya frameborder="0"
kwi- <iframe>
s yakho njengoko sibhala ngaphezulu oko kuwe.
Umzekelo
Songa naluphi na uzinziso njengelungu <iframe>
lomzali kunye .embed-responsive
nomyinge womlinganiselo. Oku .embed-responsive-item
akufuneki ngokungqongqo, kodwa siyayikhuthaza.
<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>
Aspect ratios
Umyinge womlinganiselo unokwenziwa ngokweeklasi zesilungisi. Ngokungagqibekanga kubonelelwe ngezi klasi zilandelayo:
<!-- 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
, ungatshintsha umlinganiselo wembonakalo ofuna ukuyisebenzisa. Nanku umzekelo $embed-responsive-aspect-ratios
woluhlu:
$embed-responsive-aspect-ratios: (
(21 9),
(16 9),
(4 3),
(1 1)
) !default;