![]() |
Here is simple way to make a youtube video Embed in Responsive. |
<style>
.video-container { position: relative; padding-bottom: 56.25%;
}
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
</style>
<div class="video-container"> <iframe src="https://www.youtube.com/embed/msizPweg3kE" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope;" allowfullscreen></iframe>
</div>
<style>
.video-container { position: relative; padding-bottom: 56.25%;
}
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%;
}
</style>
<div class="video-container"> <iframe src="https://www.youtube.com/embed/msizPweg3kE" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope;" allowfullscreen></iframe>
</div>
Category
: |
Web Tutorial |
Sub Category
: |
HTML Iframe Tutorial |
Uploaded by
: |
Admin |