Enkorpigas
Kreu respondemajn filmetojn aŭ bildprezentojn bazitajn sur la larĝo de la gepatro kreante internan rilatumon, kiu skalas en iu ajn aparato.
Pri
Reguloj estas rekte aplikataj al <iframe>, <embed>, <video>, kaj <object>elementoj; laŭvole uzu eksplicitan posteulklason .embed-responsive-itemkiam vi volas kongrui kun la stilo por aliaj atributoj.
Por-Konsileto! Vi ne bezonas inkluzivi frameborder="0"en viaj <iframe>s ĉar ni superregas tion por vi.
Ekzemplo
Envolvu ajnan enkonstruon kiel <iframe>en gepatra elemento kun .embed-responsivekaj bildformato. La .embed-responsive-itemne estas strikte postulata, sed ni instigas ĝin.
<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>
Bildformatoj
Bildformatoj povas esti personecigitaj per modifklasoj. Defaŭlte la sekvaj proporciaj klasoj estas provizitaj:
<!-- 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>
Ene _variables.scssde , vi povas ŝanĝi la proporciojn, kiujn vi volas uzi. Jen ekzemplo de la $embed-responsive-aspect-ratioslisto:
$embed-responsive-aspect-ratios: (
(21 9),
(16 9),
(4 3),
(1 1)
) !default;