This article will explain in detail about how to achieve mobile phone adaptive webpage in HTML, and Xiaobian feels very practical, so share it for everyone to do a reference, I hope everyone can gain something after reading this article. .
Mainly to change the HTML page declaration:
Add the following code to the web page, it can be displayed normally:
width – viewport width
height – height of the viewport
initial-scale – initial scaling
Minimum-Scale – Allows users to zoom in the minimum proportion
maximum-scale – Allow users to zoom in the maximum proportion
user-scalable – Can users can scalable
, can put the above code Change to the following code, the effect is the same:
About how to implement mobile phone adaptive webpage in HTML, I hope that the above can help you have a certain help, you can learn more. If the article is good, you can share it out to let more people see.
The last do not set too large specific width attributes For example, if you set the width properties of the body to 1000px on the web page, this is certain, but it can be set to 90%, which is the screen adaptive.