Make HTML page scaling fit for mobile client dimensions

Source: Internet
Author: User

Don't say a lot, just look at the code.

<script type= "Text/javascript" >var w = screen.width;var rate = "0.55", switch (w) {Case 320:case 6                    40:rate = "0.5";                Break                    Case 365:case 720:case 375:case 750:rate = "0.585";                Break                    Case 414:case 1242:case 1080:rate = "0.64";                Break                    Default:rate = "0.55"; break;} document.write ("<meta name= ' viewport ' content= ' width=device-width,initial-scale=" +rate+ ", minimum-scale=0.2, maximum-scale=1, User-scalable=no ' > ");</script><meta charset= "UTF-8" ><title>DEMO</title><!--atwind | Chaosstudio http://cszi.com--><link rel= "stylesheet" href= "Css/normalize.css" >

。。。。

The back is just a little bit off.

Make HTML page scaling fit for mobile client dimensions

Related Article

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.