Created
June 7, 2021 18:07
-
-
Save tyidnet/4564bb5db8c1a612d3b5c44820277a4b to your computer and use it in GitHub Desktop.
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
<style> | |
body { margin: 0; } | |
.vimeo-container { | |
padding: 0; | |
width: 100%; | |
height: 100vh; | |
overflow: hidden; | |
position: relative; | |
} | |
iframe { | |
box-sizing: border-box; | |
width: 177.77777778vh; | |
height: 56.25vw; | |
min-width: 100%; | |
min-height: 100%; | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
transform: translate(-50%, -50%); | |
} | |
</style> | |
<div class="vimeo-container"> | |
<iframe src="https://player.vimeo.com/video/[videoId]?api=1&background=1&autoplay=1&loop=1" allowfullscreen="allowfullscreen" frameborder="0"></iframe> | |
</div> |
I second this, you are a life-saver on a project - Huge thanks!
this is fantastic. thanks a lot!
God bless you, i was almost considering moving to Cloudinary.
Thanks!!! This code is really life-saver!!
thanks a loooot!! it really works!
TRUE HERO
GREAT!
4 years later this is still a great trick, I've been looking at the best way to do this for a few hours, a reddit forum sent me here, thanks!
thank you thank you thank you, I've been trying to do this myself for so many years. you are a hero!
Thanks you for the share 🥇
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You really deserve a bug hug, the only working snippet of the entire web. Thanks!