Responsive YouTube embeds

This commit is contained in:
Paulus Schoutsen 2015-12-22 09:14:03 -08:00
parent d828471602
commit 98cabf4099
4 changed files with 27 additions and 8 deletions

View file

@ -386,3 +386,21 @@ p.note {
}
}
}
// Responsive YouTube embeds.
// https://css-tricks.com/NetMag/FluidWidthVideo/Article-FluidWidthVideo.php
.videoWrapper {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 25px;
height: 0;
margin-bottom: 25px;
iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}