Created
April 1, 2019 21:28
-
-
Save dudelis/245d871deb898b17aa6f3ffc6640b946 to your computer and use it in GitHub Desktop.
K2: Video Background
This file contains 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
const html = '<div id="k2-background-video" class="bg-video"><video class="bg-video__content" autoplay muted loop><source src="https://github.com/dudelis/K2Devs/raw/master/k2-ui-features/k2-video-background/video.mp4" type="video/mp4"><source src="https://github.com/dudelis/K2Devs/raw/master/k2-ui-features/k2-video-background/video.webm" type="video/webm">Your browser is not supported</video></div>'; | |
$('.runtime-content').prepend(html); |
This file contains 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
.bg-video { | |
position: absolute; | |
top: 0; | |
left: 0; | |
height: 100%; | |
width: 100%; | |
z-index: -1; | |
opacity: .40; | |
overflow: hidden; | |
} | |
.bg-video__content { | |
height: 100%; | |
width: 100%; | |
object-fit: cover; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment