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

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

WBOY
Release: 2016-06-24 11:45:33
Original
909 people have browsed it

  1. 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.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template