Skip to content

Responsive video container for embed/object/iframe videos

Notifications You must be signed in to change notification settings

zachakbar/video-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

video-wrapper

Responsive video container for embed/object/iframe videos. This uses the bourbon mixins position & size.

.video-wrapper {
  height: 0;
  overflow: hidden;
  padding-bottom: 56.25%; // 16:9
  //padding-bottom: 75%; // 4:3
  position: relative;

  embed,
  object,
  iframe {
    @include position(absolute, 0 null null 0);
    @include size(100%);
  }
}

Example Usage:

<div class="video-wrapper">
  <iframe src="https://player.vimeo.com/video/87110435?title=0&byline=0&portrait=0" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
</div>

About

Responsive video container for embed/object/iframe videos

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages