<! DOCTYPE html>
TINYSCREEN,CSS:
body{
background:red;
}
SMALLSCREEN.CSS:
body{
background:green;
}
CSS works when Min-width and Max-width are used.
----------------------------------------------------------------
<! DOCTYPE html>
CSS has no effect when using Min-device-width and Max-device-width.
----------------------------------------------------------------
Reason:
the difference between max-device-width and Max-width
Max-device-width and max-width are differentiated and behave in the following ways:
1, Max-device-width is the width of the entire display area of the device, for example, the actual screen width of the device.
2. Max-width is the width of the target display area, for example, the browser width.
3, if the use of max-device-width, then in the PC browser to browse the Web page, zoom out or enlarge the browser is not to do CSS, because "PC device" does not change. However, if you use Max-width to zoom in or out of the browser, the CSS is executed because the "display area" is the size of the browser.
4, if the use of max-device-width, then when the phone from vertical to horizontal, CSS is not executed, because "phone width" does not change. If you use Max-width, the CSS is executed when the phone is vertical, because the display area has changed.
5. In general, use Max-device-width for "mobile device" users and Max-width for "PC device" users.
Reference Links:
Click to open link