javascript - Will the mobile browser have a default viewport, which will display the page on the mobile screen after zooming?
过去多啦不再A梦2017-05-16 13:43:30
0
2
482
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?
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
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
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
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