How to use the meta viewport property of HTML
This article mainly introduces how to use the meta viewport attribute of HTML. It is very detailed and has a certain reference value. Friends who are interested must finish it!
What is Viewport?
Mobile browsers place pages in a virtual "viewport" that is usually wider than the screen, so that instead of squeezing each page into a small window (which destroys the layout of pages that are not optimized for mobile browsers), users can pan and zoom to see different parts of the page. Mobile Safari browsers have recently introduced viewport as a metatag, allowing web developers to control the size and scaling of viewport, which is also basically supported by other mobile browsers.
Viewport Foundation
A commonly used viewportmeta tag for a page optimized for mobile pages is roughly as follows: