Created
June 9, 2019 11:18
-
-
Save sr9yar/b389f3e767dfcd5f47639559d3558d17 to your computer and use it in GitHub Desktop.
Responsive youtube video
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
<style> | |
.video-wrapper | |
{ | |
position: relative; | |
padding-bottom: 51.5%; | |
padding-top: 25px; | |
height: 0; | |
border-radius: 4px; | |
overflow: hidden; | |
} | |
.video-wrapper iframe | |
{ | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
} | |
</style> | |
<div class="video-wrapper"> | |
<iframe | |
autoplay="true" | |
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" | |
src="https://www.youtube.com/embed/Q0oIoR9mLwc?autoplay=1&controls=1&mute=0&loop=1&playlist=Q0oIoR9mLwc&modestbranding=1" | |
frameborder="0"/> | |
</div> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment