html mobile scale viewport code example
Example 1: html change viewport to smartphone size
<meta name="viewport" content="width=500, initial-scale=1">
Example 2: device-width
body {
background: white;
}
@media screen and (min-width: 980px) /* Desktop */ {
body {
background: red;
}
}
@media screen and (max-width: 979px) /* Tablet */ {
body {
background: blue;
}
}
@media screen and (max-width: 500px) /* Mobile */ {
body {
background: green;
}
}