The mobile browser will have a default viewport view, which defaults the width of the page we wrote to 980px, and zooms and fills it into the mobile browser. How many times is the zoom here?
曾经蜡笔没有小新2017-05-16 13:45:30
No, no, I’ll help you figure it out.
Viewport is not a browser behavior, it needs to be explicitly declared in the <head>, your programming behavior
It doesn’t make sense for you to struggle with the default amount and the zoom amount, because you let it go When this happens, it is a bad behavior..
I will answer your question next.
If you do not declare a viewport, the mobile browser will think that the page width is 980px and the scaling ratio is 980/(browser default viewport width (device-width), which may be 320, 360, 375), and then you If you look at different devices, you will find that their scaling ratios seem to be different. This is related to device-width (software aspect), as well as screen size and screen resolution (hardware aspect)
Hmm...I haven't seriously verified the official documents or anything else, but it feels like this is right
巴扎黑2017-05-16 13:45:30
The page on the PC side is 980px, and it can be fully displayed after zooming. If the page on the PC side is 1200px, or larger, then the mobile browser will load at 980px by default, and the excess 400px will be displayed on the mobile phone. Even after cropping, the scroll bar still appears