Skip to content

Instantly share code, notes, and snippets.

@IgorGavrilenko
Created June 15, 2017 16:38
Show Gist options
  • Select an option

  • Save IgorGavrilenko/1b0ddb475721ad3dcd40c66946674f0a to your computer and use it in GitHub Desktop.

Select an option

Save IgorGavrilenko/1b0ddb475721ad3dcd40c66946674f0a to your computer and use it in GitHub Desktop.
aspect ratio
.video-container {
position: relative;
height: 0;
padding-bottom: 56.25%;
}
.video-container > * {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment