Embed Video
Aspect ratio is perfect for responsively handling video or slideshow embeds based on the width of the parent.
Responsive Video
Wrap any embed, like an iframe, in a element with add aspect ratio classes. The immediate element is automatically with .aspect-video or other aspect ratio classes to specify the aspect ratio for an element:
<iframe class="w-full aspect-video" src="https://www.youtube.com/embed/KjLS0VrIMXQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>