Force iframe YouTube video to center fit and full cover the screen in the background using HTML5 CSS3
Full-size YouTube video, all aspect ratios, CSS only TL:DR – working fiddle As an update/improvement to @Hinrich’s answer, I have created a CSS-only scaler that works for ALL aspect ratios – even the extremes. Rather than over-compensating the width to fit most screen sizes, the iframe is set using vw and vh and offset using … Read more