xxxxxxxxxx
@media only screen and (min-device-width: 900px) and (max-device-width: 1200px) {
/* insert styles here */
}
xxxxxxxxxx
@media only screen and (max-width: 1200px){
/*Tablets [601px -> 1200px]*/
}
@media only screen and (max-width: 600px){
/*Big smartphones [426px -> 600px]*/
}
@media only screen and (max-width: 425px){
/*Small smartphones [325px -> 425px]*/
}
xxxxxxxxxx
@media only screen and (max-width: 600px) {
body {
background-color: lightblue;
}
}
xxxxxxxxxx
/* BOOSTRAP MEDIA BREAKPOINTS */
/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
.selector {
background-color:#f00;
}
}
/* Medium devices (tablets, 768px and up) The navbar toggle appears at this breakpoint */
@media (min-width: 768px) {}
/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {}
/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {}
xxxxxxxxxx
@media screen and (min-width: 992px) {
.greater-than-large {
color: red;
}
}
@media screen and (max-width: 576px) {
.less-than-extra-small {
color: red;
}
}
@media screen and (min-width: 576px) and (max-width: 992px) {
.between-small-and-medium {
color: red;
}
}
xxxxxxxxxx
/* b/w 577px to 720px screens */
@media only screen and (min-width: 577px) and (max-width: 720px) {
h1 {
font-size: 1.0rem;
}
}
/* 800px and above - Desktop monitors */
@media only screen and (min-width: 800px) {
h1 {
font-size: 1.5rem;
}
}
/* new way */
@media only screen and (width >= 800px) {
p {
font-size: 1rem;
}
}
xxxxxxxxxx
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
/* Extra Small Devices, Phones */
@media only screen and (min-width : 480px) {
}
/* Small Devices, Tablets */
@media only screen and (min-width : 768px) {
}
/* Medium Devices, Desktops */
@media only screen and (min-width : 992px) {
}
/* Large Devices, Wide Screens */
@media only screen and (min-width : 1200px) {
}
xxxxxxxxxx
@media only screen and (max-width: 1200px){
/*Tablets [601px -> 1200px]*/
}
@media only screen and (max-width: 600px){
/*Big smartphones [426px -> 600px]*/
}
@media only screen and (max-width: 425px){
/*Small smartphones [325px -> 425px]*/
}
Use contextual spacing instead
xxxxxxxxxx
media screen and (min-width: 1300px) {
media screen and (min-width: 400px) and (max-width: 700px) {
xxxxxxxxxx
@media (min-width: 400px) and (max-width: 600px) {
// Styles for viewports between 400px and 600px.
}