Source

Ɛmbad dɛn

Krio rispɔnsiv vidio ɔ slayd sho ɛmbad bay di wit we di mama ɔ papa gɛt bay we yu mek wan intrinsik rɛtɛshɔn we de skel pan ɛni divays.

Bɔt

Dɛn kin yuz lɔ dɛn dairekt wan fɔ <iframe>, <embed>, <video>, ɛn <object>ɛlimɛnt dɛn; opshɔnal yuz wan ɛksplisit dessɛndant klas .embed-responsive-itemwe yu want fɔ mach di stayl fɔ ɔda atribyut dɛn.

Pro-Tip fɔ di wan dɛn! Yu nɔ nid fɔ inklud frameborder="0"insay yu <iframe>s as wi de ɔvalayz dat fɔ yu.

Ɛgzampul

Rap ɛni ɛmbad lɛk wan <iframe>insay wan mama ɛn papa ɛlimɛnt wit .embed-responsiveɛn wan aspek rɛsɛshɔn. Di .embed-responsive-itemnɔto strikt wan, bɔt wi de ɛnkɔrej am.

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

Aspek rɛsɛshɔn dɛn

Aspek ratios kin kɔstɔmayz wit modifya klas dɛn. Bay difɔlt dɛn de gi di fɔs ratio klas dɛn:

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

Insay _variables.scss, yu kin chenj di aspek ratio dɛn we yu want fɔ yuz. Na dis na wan ɛgzampul bɔt di $embed-responsive-aspect-ratioslist:

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