Common meta settings

1. Set the viewport

<meta name="viewport" content="width=device-width,user-scalable=no">  

This sentence sets the width of the viewport to the width of the device and prohibits the user from zooming

a) width: width (value/device-width) default is 980

b)height height (value/device-height)

c)initial-scale: initial scaling

d)minimum-scale: the minimum scale that the user is allowed to zoom to

e)maximum-scale: the maximum scale that the user is allowed to zoom to

f)user-scalable: whether the user can manually scale

 

2. Force vertical screen

Only browsers with UC and X5 cores support it, other browsers do not.

How to write x5:

 

<meta name="x5-orientation" content="portrait">  

 

How to write uc:

<meta name="screen-orientation" content="portrait"> 

3, browser full screen display

Only browsers with UC and X5 cores support it, other browsers do not.

Writing X5:

<meta name="x5-fullscreen" content="true">  

How to write uc:

<meta name="full-screen" content="yes"> 

Original blog: Common meta settings on mobile

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325021005&siteId=291194637