Skip to content

Instantly share code, notes, and snippets.

@gowrishankarin
Last active November 28, 2016 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gowrishankarin/0b9af5a6e74ea72470a72c774b754c56 to your computer and use it in GitHub Desktop.
Save gowrishankarin/0b9af5a6e74ea72470a72c774b754c56 to your computer and use it in GitHub Desktop.
Media Queries Sample
@media screen and (min-width: 1px) and (max-width: 400px) {
/*
This seems like a good place for code... Make sure you change the breakpoints!
*/
body {
background: #ff0000;
}
}
@media screen and (min-width: 401px) and (max-width: 599px) {
/*
This seems like a good place for code... Make sure you change the breakpoints!
*/
body {
background: #00ff00;
}
}
@media screen and (min-width: 600px) {
/*
This seems like a good place for code... Make sure you change the breakpoints!
*/
body {
background: #0000ff
}
}
// OR
body {
background: #ff0000;
}
@media screen and (max-width: 400px) {
/*
This seems like a good place for code... Make sure you change the breakpoints!
*/
body {
background: #00ff00;
}
}
@media screen and (min-width: 600px) {
/*
This seems like a good place for code... Make sure you change the breakpoints!
*/
body {
background: #0000ff
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment