diff options
add responsive video code
1 files changed, 22 insertions, 0 deletions
| -rw-r--r-- | src/media.less | 22 |
diff --git a/src/media.less b/src/media.less index 5d24648..a3e055e 100644 --- a/src/media.less +++ b/src/media.less @@ -3,4 +3,26 @@ display: block; max-width: 100%; height: auto; +} +.video-responsive { + position: relative; + height: 0; + padding-top: 3rem; + padding-bottom: 56.25%; /* 16:9 */ + overflow: hidden; + + iframe, + object, + embed { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } + video { + width: 100%; + max-width: 100%; + height: auto; + } }
\ No newline at end of file |