Created
May 13, 2015 10:35
-
-
Save dnikonov/584b74f000a0c9d0c6ee to your computer and use it in GitHub Desktop.
HTML: IFRAME RESPONSIVE
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
<div class="iframe-responsive"> | |
<img src="/upload/images/640x360.gif" alt=""> | |
<iframe width="640" height="360" src="https://www.youtube.com/embed/CWaZrgc-g9A?rel=0" frameborder="0" allowfullscreen></iframe> | |
</div> | |
.iframe-responsive {position: relative;} | |
.iframe-responsive img {display: block; width: 100%; height: auto;} | |
.iframe-responsive iframe {position: absolute; top:0; left: 0; width: 100%; height: 100%; display: block; vertical-align: top;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment