From 597b71f18ef3d0544d7d7cb57bc8df0917cdace7 Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Thu, 14 Apr 2016 19:11:26 +0800 Subject: add responsive video code --- dist/spectre.css | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'dist/spectre.css') diff --git a/dist/spectre.css b/dist/spectre.css index db4537b..171531e 100644 --- a/dist/spectre.css +++ b/dist/spectre.css @@ -658,6 +658,28 @@ pre code { max-width: 100%; height: auto; } +.video-responsive { + position: relative; + height: 0; + padding-top: 3rem; + padding-bottom: 56.25%; + /* 16:9 */ + overflow: hidden; +} +.video-responsive iframe, +.video-responsive object, +.video-responsive embed { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.video-responsive video { + width: 100%; + max-width: 100%; + height: auto; +} .table { width: 100%; border-collapse: collapse; -- cgit v1.3.1-26-gb76a