1@media only screen and (max-width: 600px) {
2 body {
3 background-color: lightblue;
4 }
5}
1/* Smartphones (portrait and landscape) ----------- */
2@media only screen
3and (min-device-width : 320px)
4and (max-device-width : 480px) {
5 /* Styles */
6}
7
8/* Smartphones (landscape) ----------- */
9@media only screen
10and (min-width : 321px) {
11 /* Styles */
12}
13
14/* Smartphones (portrait) ----------- */
15@media only screen
16and (max-width : 320px) {
17 /* Styles */
18}
19
20/* iPads (portrait and landscape) ----------- */
21@media only screen
22and (min-device-width : 768px)
23and (max-device-width : 1024px) {
24 /* Styles */
25}
26
27/* iPads (landscape) ----------- */
28@media only screen
29and (min-device-width : 768px)
30and (max-device-width : 1024px)
31and (orientation : landscape) {
32 /* Styles */
33}
34
35/* iPads (portrait) ----------- */
36@media only screen
37and (min-device-width : 768px)
38and (max-device-width : 1024px)
39and (orientation : portrait) {
40 /* Styles */
41}
42
43/* Desktops and laptops ----------- */
44@media only screen
45and (min-width : 1224px) {
46 /* Styles */
47}
48
49/* Large screens ----------- */
50@media only screen
51and (min-width : 1824px) {
52 /* Styles */
53}
54
55/* iPhone 4 - 5s ----------- */
56@media
57only screen and (-webkit-min-device-pixel-ratio : 1.5),
58only screen and (min-device-pixel-ratio : 1.5) {
59 /* Styles */
60}
61
62/* iPhone 6 ----------- */
63@media
64only screen and (max-device-width: 667px)
65only screen and (-webkit-device-pixel-ratio: 2) {
66 /* Styles */
67}
68
69/* iPhone 6+ ----------- */
70@media
71only screen and (min-device-width : 414px)
72only screen and (-webkit-device-pixel-ratio: 3) {
73 /*** You've spent way too much on a phone ***/
74}
75
76/* Samsung Galaxy S7 Edge ----------- */
77@media only screen
78and (-webkit-min-device-pixel-ratio: 3),
79and (min-resolution: 192dpi)and (max-width:640px) {
80 /* Styles */
81}
82
1@media (min-width:320px) { /* smartphones, iPhone, portrait 480x320 phones */ }
2@media (min-width:481px) { /* portrait e-readers (Nook/Kindle), smaller tablets @ 600 or @ 640 wide. */ }
3@media (min-width:641px) { /* portrait tablets, portrait iPad, landscape e-readers, landscape 800x480 or 854x480 phones */ }
4@media (min-width:961px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
5@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
6@media (min-width:1281px) { /* hi-res laptops and desktops */ }
7