Last active
May 25, 2016 23:04
-
-
Save manfromanotherland/9cce8b15a15b7caaa004 to your computer and use it in GitHub Desktop.
CSS: Fluid Width Video » https://css-tricks.com/NetMag/FluidWidthVideo/Article-FluidWidthVideo.php #snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.video-responsive { | |
position: relative; | |
padding-bottom: 56.25%; /* 16:9 */ | |
height: 0; | |
iframe { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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