<div class="video">
<div class="yt">
<iframe width="560" height="315" src="https://www.youtube.com/embed/eIOAtcuK8bU" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
</div>
</div>
body{
background:#333;
}
.video{
max-width:640px;
}
.yt{
position: relative;
width: 100%;
padding-bottom: 56.25%;
}
.yt iframe {
position: absolute;
width: 100%;
height:100%;
top: 0;
left: 0;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.