Study notes-reasons and solutions for page enlargement after double-clicking on the mobile terminal

In mobile development or mobile adaptation, sometimes you will encounter double-clicking on the content of the page, and the page will be enlarged. This is not the effect we want. We need to find the errors in the style and correct them.


1. Reason:

Most of the reasons for this situation are: when writing the page style, the width of a certain label is greater than the width of the page, and a horizontal scroll bar appears.

2. Solution:

1. Set the meta attributes:

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">

It is mandatory that the screen size cannot be scaled through the maximum-scale attribute.

2. Find the label that exceeds the width of the page:

Use a different method instead.

 

Guess you like

Origin blog.csdn.net/qq_41339126/article/details/114282974