Skip to content

Instantly share code, notes, and snippets.

@3200pro
Created March 21, 2022 12:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3200pro/338a4be4b562844293261b45629a6785 to your computer and use it in GitHub Desktop.
Save 3200pro/338a4be4b562844293261b45629a6785 to your computer and use it in GitHub Desktop.
Vimeo Video Styling
.embed-container {
--video--width: 1296;
--video--height: 540;
position: relative;
padding-bottom: calc(var(--video--height) / var(--video--width) * 100%); /* 41.66666667% */
overflow: hidden;
max-width: 100%;
background: black;
}
.embed-container iframe,
.embed-container object,
.embed-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment