-
-
Save SelenIT/26c0873384e9ae61e23c to your computer and use it in GitHub Desktop.
Media query to detect full screen mode!
This file contains hidden or 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
/** | |
* Media query to detect full screen mode! | |
* Y U NO WORK Chrome?? | |
* Firefox, you’re lovely. | |
*/ | |
body { | |
background: red; | |
font: bold 400% Helvetica Neue, sans-serif; | |
color: white; | |
font-size: 10vh; | |
} | |
html { | |
height: 100vh; | |
animation: fix-vh 1s; | |
} | |
@media screen and (min-device-width: 90vw) and (min-device-height: 90vh) and (max-device-width: 110vw) and (max-device-height: 110vh) { | |
body { | |
background: green; | |
} | |
body::before { content: "Full screen!!" } | |
} | |
@keyframes fix-vh { | |
from { | |
font-size: 1em; | |
} | |
50% { | |
font-size: 1.0001em; | |
} | |
to { | |
font-size: 1em; | |
} | |
} |
This file contains hidden or 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
test |
This file contains hidden or 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 hidden or 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":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment