The width of mobile website adaptive

Source: Internet
Author: User

Method One:

Add the following code to the

<name   content initial-scale  Minimum-scalemaximum-scaleuser-scalable/> 
Width=device-width:# indicates width is the width of the device screen initial-scale=1.0  :# indicates the initial zoom ratio minimum-scale=0.5  :# indicates the minimum scale maximum-scale=2.0  :# indicates the maximum zoom ratio User-scalable=yes  :# Indicates whether the user can adjust the zoom ratio

Method Two:

The top of the page resembles the following code:

<! DOCTYPE .....  > 

To be replaced by:

<! DOCTYPE HTML Public "-//wapforum//dtd XHTML Mobile 1.0//en" "Http://www.wapforum.org/DTD/xhtml-mobile10.dtd" >

Note: This method in the iphone horizontal screen width will be more than the screen width of the scroll bar, the solution is to add method one code.

The width of mobile website adaptive

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.