Created
October 1, 2018 20:48
-
-
Save LeaVerou/c4732bae3238d9cfce34797418ed209a to your computer and use it in GitHub Desktop.
Video & wrapper that never gets bigger than the viewport?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Video & wrapper that never gets bigger than the viewport? | |
* (Does not work right now. It resizes correctly for available width, but not available height) | |
*/ | |
.media-frame { | |
border: 10px solid red; | |
width: fit-content; | |
max-width: 100%; | |
max-height: -webkit-fill-available; | |
} | |
.media-frame video { | |
max-width: 100%; | |
max-height: -webkit-fill-available; | |
background: yellow; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="media-frame"><video src="https://mavo.io/demos/eshop/video.mp4" class="paused"></video></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment