Youtube-Video responsiv einbinden

HTML:

<div class="videocontainer">
<iframe src="https://www.youtube-nocookie.com/embed/XXXXXXXX?rel=0" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen class="fullvideo"></iframe></div>

CSS:

.videocontainer {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
}
.fullvideo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
This entry was posted in Spiroublog. Bookmark the permalink.