Skip to content

Instantly share code, notes, and snippets.

@renemorozowich
Created June 20, 2019 13:35
Show Gist options
  • Save renemorozowich/72b0560975441e0fea34de64bc44e75d to your computer and use it in GitHub Desktop.
Save renemorozowich/72b0560975441e0fea34de64bc44e75d to your computer and use it in GitHub Desktop.
Basic media query
/* mobile first */
h1 {
color: #ff0000; /* red */
}
/* tablet */
@media only screen and (min-width: 768px) {
h1 {
color: #ffff00; /* yellow */
}
/* add more styles here for tablet */
}
/* desktop */
@media only screen and (min-width: 1000px) {
h1 {
color: #ff00ff; /* pink */
}
/* add more styles here for mobile */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment