1@media only screen and (max-width: 1200px){
2 /*Tablets [601px -> 1200px]*/
3}
4@media only screen and (max-width: 600px){
5 /*Big smartphones [426px -> 600px]*/
6}
7@media only screen and (max-width: 425px){
8 /*Small smartphones [325px -> 425px]*/
9}
1@media only screen and (max-width: 600px) {
2 body {
3 background-color: lightblue;
4 }
5}
1/* BOOSTRAP MEDIA BREAKPOINTS */
2/* Small devices (landscape phones, 576px and up) */
3@media (min-width: 576px) {
4 .selector {
5 background-color:#f00;
6 }
7}
8/* Medium devices (tablets, 768px and up) The navbar toggle appears at this breakpoint */
9@media (min-width: 768px) {}
10/* Large devices (desktops, 992px and up) */
11@media (min-width: 992px) {}
12/* Extra large devices (large desktops, 1200px and up) */
13@media (min-width: 1200px) {}
1body {
2 background: white;
3}
4
5@media screen and (min-width: 980px) /* Desktop */ {
6 body {
7 background: red;
8 }
9}
10
11@media screen and (max-width: 979px) /* Tablet */ {
12 body {
13 background: blue;
14 }
15}
16
17@media screen and (max-width: 500px) /* Mobile */ {
18 body {
19 background: green;
20 }
21}
1<style>
2 .example1 {margin:10px auto; background:deepskyblue}
3@media (max-width:600px)
4{
5 .example1 {width:70px; height:50px}
6}
7@media (min-width:600px)
8{
9 .example1 {width:100px; height:50px}
10}
11</style>
12<div id="example1">Hi</div>