Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
Commit597b71f18ef3d0544d7d7cb57bc8df0917cdace7 (patch)
Author
 Yan Zhu <picturepan2@hotmail.com>
2016-04-14 19:11:26 +0800
Committer
 Yan Zhu <picturepan2@hotmail.com>
2016-04-14 19:11:26 +0800
Files18772364979c33cd2a40f23b04ed3046795cfbc4 /src
Spectre-Dark-Gruvbox-597b71f18ef3d0544d7d7cb57bc8df0917cdace7.tar
Spectre-Dark-Gruvbox-597b71f18ef3d0544d7d7cb57bc8df0917cdace7.tar.gz
Spectre-Dark-Gruvbox-597b71f18ef3d0544d7d7cb57bc8df0917cdace7.zip
Parent261fee396ad8a0a43f6463670c960bc7359219c8 (diff)
add responsive video code
1 files changed, 22 insertions, 0 deletions
-rw-r--r--src/media.less22
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