-
-
Save nocodesupplyco/a8f2c0f95111e175a384473fdf98c91f to your computer and use it in GitHub Desktop.
Vimeo Video as 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
.video-bg { | |
position: absolute; | |
left: 0%; | |
top: 0%; | |
right: 0%; | |
bottom: 0%; | |
z-index: 0; | |
overflow: hidden; | |
} | |
.video-bg_iframe { | |
position: absolute; | |
left: 50%; | |
top: 50%; | |
right: auto; | |
bottom: auto; | |
width: 100vw; | |
height: 56.25vw; | |
min-height: 100vh; | |
min-width: 177.77vh; | |
transform: translate(-50%, -50%); | |
} |
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
<div class="video-bg"> | |
<iframe src="https://player.vimeo.com/video/{{VIMEO-ID}}?background=1" class="video-bg_iframe" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment