Last active
August 29, 2015 14:21
-
-
Save sundaycrafts/53515a94410267b489fa to your computer and use it in GitHub Desktop.
css: responsive youtube video
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
http://h2ham.net/youtube-responsive | |
.youtube { | |
position: relative; | |
width: 100%; | |
padding-top: 56.25%; // it is aspect ratio. padding respect to the width | |
iframe { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100% !important; | |
height: 100% !important; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It can also use google map( google map default aspect ratio is 75% in w600 x h450 )