Created
May 30, 2016 20:21
-
-
Save sangress/35ba7b22c4e687f5a96abefd98602f91 to your computer and use it in GitHub Desktop.
media_queries_ex
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
body { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} | |
div { | |
width: 400px; | |
height: 400px; | |
border: 1px dashed green; | |
} | |
div p { | |
font-size: 1em; | |
color: #000; | |
} | |
/* tablets and mobile phones */ | |
@media (max-width: 768px) { | |
div { | |
background-color: darkgoldenrod; | |
} | |
div p { | |
font-size: 2em; | |
color: #fff; | |
} | |
} | |
/*And operator*/ | |
/*@media (min-width: 700px) and (orientation: landscape) { ... }*/ | |
/*Only*/ | |
/*<link rel="stylesheet" media="only screen and (color)" href="example.css" />*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment