Created
September 7, 2016 01:29
-
-
Save Perun/0cacc3c76b0896043b5ca6df915bea86 to your computer and use it in GitHub Desktop.
Responsive iframes vzw. YouTube-Videos
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
<h1>Nich-responsive Einbindung</h1> | |
<div title="Kampf gegen ein Nazgûl im Westen von Gondor. Aufgenommen in Herr der Ringe Online."> | |
<iframe width="530" height="298" src="https://www.youtube.com/embed/KdI7EQsmlJs" frameborder="0" allowfullscreen></iframe> | |
</div> | |
<h1>Responsive Einbindung</h1> | |
<div class="video-block" title="Kampf gegen ein Nazgûl im Westen von Gondor. Aufgenommen in Herr der Ringe Online."> | |
<iframe width="530" height="298" src="https://www.youtube.com/embed/KdI7EQsmlJs" frameborder="0" allowfullscreen></iframe> | |
</div> |
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
.video-block { | |
position: relative; | |
padding-bottom: 56.25%; /* 16:9 */ | |
height: 0; | |
overflow: hidden; | |
width: 100%; height: auto;} | |
.video-block 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