Home >Web Front-end >HTML Tutorial >How to add meta name='viewport' in HTML to control the page not to be deformed when it is zoomed in or out_html/css_WEB-ITnose
Add the following meta content on PC:
="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
....
2. Add the following meta content on the mobile side:
"viewport" content="target-densitydpi=device-dpi, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
.... .
Description:
target-densitydpi=device-dpi, specify the screen pixel density DPI, device -dpi is the original DPI value of the device, without any scaling.
Width=device-width, specifies the screen width, device-width is the width of the device screen.