Skip to content

Instantly share code, notes, and snippets.

@leemark
Last active December 15, 2015 09:59
Show Gist options
  • Save leemark/5242857 to your computer and use it in GitHub Desktop.
Save leemark/5242857 to your computer and use it in GitHub Desktop.
Some example media queries.
<ul>
<li data-email="[email protected]">Jim</li>
<li data-email="[email protected]">Julie</li>
<li data-email="[email protected]">Jay</li>
<li data-email="[email protected]">Jennie</li>
</ul>
@media screen and (min-width: 1100px) {
body {
background: darkorange;
}
ul li:after {
content: " (" attr(data-email) ")";
}
}
@media screen and (max-width: 1099px) and (min-width: 820px) {
body {
background: cornflowerblue;
}
}
@media screen and (max-width: 819px) and (min-width: 600px) {
body {
background: khaki;
}
ul li {
list-style: none;
margin: 0;
}
}
@media screen and (max-width: 599px) {
body {
background: palegoldenrod;
}
ul li {
list-style: none;
display: inline;
}
ul li:after {
content: ", ";
}
ul li:last-child:after {
content: none;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment