Created
January 17, 2019 14:38
-
-
Save jonbrockett/ece6353fd3d3c435016d804de3adbafa to your computer and use it in GitHub Desktop.
Hero Video
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Hero Video | |
| .hero-video { | |
| left: 50%; // To center video | |
| transform: translate(-50%, 0); // To center video | |
| min-width: 100%; // To stretch to the container | |
| min-height: 100%; // To stretch to the container | |
| position: absolute; | |
| z-index: -1; // To drop behind content | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <video class="hero-video" autoplay playsinline loop muted preload="none" poster="" style="background-image: url();"> | |
| <source src="" type="video/mp4"> | |
| </video> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment