Skip to content

Instantly share code, notes, and snippets.

@avspeed
Last active December 5, 2019 00:43
Show Gist options
  • Save avspeed/aa7c3d5136a9d2a6037d3a45a1e53e42 to your computer and use it in GitHub Desktop.
Save avspeed/aa7c3d5136a9d2a6037d3a45a1e53e42 to your computer and use it in GitHub Desktop.
video fill container
<div id="test-container" style="
width: 100vw;
height: 100vh;
">
<video autoplay="" id="test-video" style="
width: 100vw;
height: 100vh;
object-fit: fill;
">
</video>
</div>
@avspeed
Copy link
Author

avspeed commented Dec 5, 2019

div fills page, video element fills div container, does not maintain aspect ratio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment