media query
@media only screen and (max-width: 600px) {
body {
background-color: lightblue;
}
}
css media query
/* 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) {}
media query in css
/*Any Mobile Device*/
@media only screen and (max-width: 767px) { }
/*Tablets Device*/
@media only screen and (max-width: 991px) { }
/*ipad Pro Device*/
@media only screen and (max-width: 1024px) { }
/*large Device*/
@media only screen and (max-width: 1200px) { }
css media query
@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;
}
}
media query
// Extra small devices (portrait phones, less than 576px)
// No media query for `xs` since this is the default in Bootstrap
// Small devices (landscape phones, 576px and up)
@media (min-width: 576px) { ... }
// Medium devices (tablets, 768px and up)
@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) { ... }
|