Last active
January 26, 2021 16:59
-
-
Save acidtone/8b22888818aa6f81653ab0858ad4c418 to your computer and use it in GitHub Desktop.
Media queries: min-width (open)
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Mobile First: min-width</title> | |
<style> | |
/* Set default styles. In this case, styles for mobile. */ | |
body { | |
background-color: grey; | |
} | |
/* Place medium screen media queries here, if needed. */ | |
@media screen and (min-width: 40rem) { | |
/* Override default styles (or declare new ones) when screen is larger than 600px ("desktop"). */ | |
body { | |
background-color: rebeccapurple; | |
} | |
} | |
/* Large screens */ | |
@media screen and (min-width: 75rem) { | |
body { | |
background-color: skyblue; | |
} | |
} | |
</style> | |
</head> | |
<body> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment