Skip to content

Instantly share code, notes, and snippets.

@juanpprieto
Created July 10, 2021 00:26
Show Gist options
  • Save juanpprieto/5d79e9fa9b10e2a874b9358a54fc2f21 to your computer and use it in GitHub Desktop.
Save juanpprieto/5d79e9fa9b10e2a874b9358a54fc2f21 to your computer and use it in GitHub Desktop.
<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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment