1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
.video-container { position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden; } .video-container iframe, .video-container object, .video-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
1
<div class="video-container"><iframe width="725" height="408" src="https://youtube.com/embed/XXXXXXXX?rel=0&showinfo=0" frameborder="0" allowfullscreen></iframe></div>
You can clone a snippet to your computer for local editing. Learn more.