Skip to content

Instantly share code, notes, and snippets.

@erwstout
Created January 25, 2016 18:34
Show Gist options
  • Save erwstout/a65edbed7fbc6abca064 to your computer and use it in GitHub Desktop.
Save erwstout/a65edbed7fbc6abca064 to your computer and use it in GitHub Desktop.
Flex Video
// Flex Video Based on Zurb Foundation
.flex-video {
position: relative;
height: 0;
padding-bottom: 75%;
margin-bottom: 1rem;
overflow: hidden;
}
.flex-video iframe,
.flex-video object,
.flex-video embed,
.flex-video video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.flex-video.widescreen {
padding-bottom: 56.25%;
}
.flex-video.vimeo {
padding-top: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment