Skip to content

Instantly share code, notes, and snippets.

@artursopelnik
Created January 2, 2019 16:50
Show Gist options
  • Save artursopelnik/3e6fb63ca6d8ef99a184e79395f47066 to your computer and use it in GitHub Desktop.
Save artursopelnik/3e6fb63ca6d8ef99a184e79395f47066 to your computer and use it in GitHub Desktop.
responsive-embed 16:9
.responsive-embed {
position: relative;
height: 0;
margin-bottom: 1rem;
padding-bottom: (9 / 16) * 100%;
overflow: hidden;
iframe,
object,
embed,
video {
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