Skip to content

Instantly share code, notes, and snippets.

@ryantroyford
Last active December 17, 2015 06:49
Show Gist options
  • Save ryantroyford/5568539 to your computer and use it in GitHub Desktop.
Save ryantroyford/5568539 to your computer and use it in GitHub Desktop.
responsive vimeo frame

i used this on my jekyll site, works like a charm. not sure how far back the browser support goes, but works on all modern ones.

this was largely figured out by Young Hahn and Garret Miller.

<div class='vid-frame' style='width: 100%; height: 0px; padding-bottom:56.25%; position:relative;'>
<iframe mozallowfullscreen='mozallowfullscreen' src='http://player.vimeo.com/video/YOUR-VIDEO-NUMBER-HERE' webkitAllowFullScreen='webkitAllowFullScreen' allowFullScreen='allowFullScreen' frameborder='0' height='100%' width='100%' style='position:absolute'> </iframe>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment