<div class="video-container">
<iframe width="560" height="315" src="https://www.youtube.com/embed/0yP3RapiOwI?si=VT967D_8CWvcY8-t" 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>
</div>
.video-container {
position: relative;
width: 100%;
max-width: 100%;
aspect-ratio: 16/9;
}
.video-container iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.