Create responsive video or slideshow embeds based on the width of the parent by creating an intrinsic ratio that scales on any device.Embed on Bootstrap
Wrap any embed, like an
<iframe>, in a parent element with
.ratio and an aspect ratio class. The immediate child element is automatically sized thanks to our universal selector
.ratio > *.
<div class="ratio ratio-16x9"> <iframe src="https://www.youtube.com/embed/zpOULjyy-n8?rel=0" allowfullscreen="allowfullscreen" title="YouTube video"></iframe> </div>