Skip to content

Instantly share code, notes, and snippets.

@manfromanotherland
Last active May 25, 2016 23:04
Show Gist options
  • Save manfromanotherland/9cce8b15a15b7caaa004 to your computer and use it in GitHub Desktop.
Save manfromanotherland/9cce8b15a15b7caaa004 to your computer and use it in GitHub Desktop.
.video-responsive {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
height: 0;
iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
<div class="video-responsive">
<iframe src="//player.vimeo.com/video/106142565" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment