Posts in current category
May 03, 2021 23:00 CSS
a visual area of a user's Web page.
as Chinese can be called a "viewport."
A mobile browser places a page
is usually wider than the screen, so that you don't have to squeeze each page into a very small window
can break the layout of a page that is not optimized for the phone browser), allowing users to pan and zoom to see different parts of the page.
tag for pages optimized for mobile pages is roughly as follows:
viewportwhich can specify a value if 600, or a special
device-widthwidth of the device (in pixels of CSS scaled to 100 percent).
widthand specifies height.
initial-scaleThe initial scale, that is, the scale when the page
loadfor the first time.
maximum-scalemaximum scale to which the user is allowed to scale.
minimum-scaleAllows the user to zoom to the minimum scale.
user-scalableWhether the user can scale manually.
The following examples demonstrate the
viewport and not using
on the mobile side:
If you're accessing it on your tablet or phone, you can click directly to see the effect.
CSS tutorial: Responsive web design