responsive video iframe

This commit is contained in:
Nazar Kanaev
2021-05-13 21:42:34 +01:00
parent da267a56ef
commit 28f08ad42a
4 changed files with 66 additions and 4 deletions

View File

@@ -360,6 +360,27 @@ select.form-control:not([multiple]):not([size]) {
margin-bottom: 0.5rem;
}
.content .video-wrapper {
position: relative;
display: block;
width: 100%;
overflow: hidden;
}
.content .video-wrapper::before {
display: block;
padding-top: 56.25%; /* 16x9 aspect ratio */
content: "";
}
.content .video-wrapper iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.content pre {
overflow-x: auto;
color: inherit;