Source

O'rnatish

Har qanday qurilmada o'lchaydigan ichki nisbatni yaratib, ota-onaning kengligidan kelib chiqqan holda sezgir video yoki slayd-shou o'rnatishlarni yarating.

Haqida

Qoidalar to'g'ridan-to'g'ri <iframe>, <embed>, <video>va <object>elementlarga qo'llaniladi; .embed-responsive-itemixtiyoriy ravishda boshqa atributlar uchun uslubni moslashtirishni xohlasangiz, aniq avlod sinfidan foydalaning .

Pro-Tip! s ga kiritishingiz shart emas , chunki biz buni frameborder="0"siz <iframe>uchun bekor qilamiz.

Misol

<iframe>Asosiy elementdagi kabi har qanday joylashtirishni .embed-responsivetomonlar nisbati bilan o‘rab oling. Bu .embed-responsive-itemqat'iy shart emas, lekin biz buni rag'batlantiramiz.

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

Tomonlar nisbati

Tomonlar nisbatlarini modifikator sinflari bilan moslashtirish mumkin.

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