in English

Gabhail a-steach

Cruthaich bhidio freagairteach no taisbeanadh-shleamhnagan stèidhichte air leud a’ phàrant le bhith a’ cruthachadh co-mheas gnèitheach a bhios a’ sgèile air inneal sam bith.

Mu dheidhinn

Tha riaghailtean air an cur gu dìreach ri <iframe>, <embed>, , <video>, agus <object>eileamaidean; gu roghnach cleachd clas sliochd follaiseach .embed-responsive-itemnuair a tha thu airson a bhith co-ionnan ris an stoidhle airson buadhan eile.

Pro-Tip! Chan fheum thu a chuir a-steach frameborder="0"na do chuid <iframe>oir tha sinn a’ dol thairis air sin dhut.

eisimpleir

Còmhdaich freumhachadh sam bith mar <iframe>eileamaid ann am pàrant le .embed-responsiveagus co-mheas taobh. Chan .embed-responsive-itemeil e gu tur riatanach, ach tha sinn ga bhrosnachadh.

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

Co-mheasan taobh

Faodar co-mheasan taobh a ghnàthachadh le clasaichean mion-atharrachaidh. Gu gnàthach tha na clasaichean co-mheas a leanas air an toirt seachad:

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

Taobh a-staigh _variables.scss, faodaidh tu na co-mheasan taobh a tha thu airson a chleachdadh atharrachadh. Seo eisimpleir den $embed-responsive-aspect-ratiosliosta:

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