Created
September 9, 2016 07:11
-
-
Save eliah-w/3480ddd9337c3409221d39af2efc89f2 to your computer and use it in GitHub Desktop.
CSS Locks
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
<!DOCTYPE html> | |
<html lang="de"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>CSS Locks</title> | |
<style type="text/css"> | |
#container { | |
width: 250px; | |
margin: 0 auto; | |
text-align: center; | |
} | |
p { | |
font-size: 1rem; | |
} | |
p:before { | |
content: "Smallest font size."; | |
} | |
@media (min-width: 320px) { | |
#container { | |
width: calc(250px + 20vw); | |
} | |
p { | |
font-size: calc(1rem + 2vw); | |
} | |
p:before { | |
content: "Resize your window!"; | |
} | |
} | |
@media (min-width: 960px) { | |
#container { | |
width: 350px; | |
} | |
p { | |
font-size: 2.5rem; | |
} | |
p:before { | |
content: "BIGGEST font size"; | |
} | |
} | |
</style> | |
</head> | |
<body> | |
<div id="container"> | |
<h1>CSS Locks</h1> | |
<p></p> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment