Source

Inkorpora

Oħloq inkorporazzjonijiet ta 'vidjow jew ta' wiri ta 'slajds li jirrispondu bbażati fuq il-wisa' tal-ġenitur billi toħloq proporzjon intrinsiku li jiskala fuq kwalunkwe apparat.

Dwar

Ir-regoli huma applikati direttament għal <iframe>, <embed>, <video>, u <object>elementi; b'għażla uża klassi dixxendenti espliċita .embed-responsive-itemmeta trid tqabbel l-istil għal attributi oħra.

Pro-Tip! M'għandekx bżonn tinkludi frameborder="0"fl- <iframe>i tiegħek peress li aħna nirrivalqu dak għalik.

Eżempju

Kebbeb kwalunkwe embed bħal <iframe>f'element ġenitur bi .embed-responsiveu proporzjon tal-aspett. Il .embed-responsive-item-mhux strettament meħtieġ, iżda aħna ninkoraġġuha.

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

Proporzjonijiet tal-aspetti

Il-proporzjonijiet tal-aspetti jistgħu jiġu personalizzati bi klassijiet ta 'modifikatur.

<!-- 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>