Created
July 22, 2014 10:33
-
-
Save chicgeek/f5d859f5c53503b27b8d to your computer and use it in GitHub Desktop.
Responsive video embed
This file contains 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
$('.somelocalselector iframe').removeAttr('height width').wrap('<div class="video"/>'); | |
.video { | |
position: relative; | |
padding-bottom: 56.5%; | |
margin-top: 2em; | |
} | |
.video iframe { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment