General knowledge of mobile phone projects

Source: Internet
Author: User
Tags home screen

1. Use PC's idea to do mobile, write dead page width

<name= "Viewport"  content= "width=640,target-densitydpi=320, User-scalable=no "/>

2. Change the initial value of jquery mobile swipe

$.event.special.swipe.horizontaldistancethreshold = 10;

3. Determine if it is a built-in browser

function is_weixin () {        var ua = navigator.userAgent.toLowerCase ();         if (Ua.match (/micromessenger/i) = = "Micromessenger")            {returntrue;         Else {            returnfalse;        }    }

4. Determine browser type

functionIsBrowser () {varsys={}; varUa=navigator.userAgent.toLowerCase (); vars; (S=ua.match (/msie ([\d.] +)/))? Sys.ie=s[1]: (S=ua.match (/firefox\/([\d.] +)/))? Sys.firefox=s[1]: (S=ua.match (/chrome\/([\d.] +)/))? Sys.chrome=s[1]: (S=ua.match (/opera. ( [\d.] +)/))? Sys.opera=s[1]: (S=ua.match (/version\/([\d.] +). *safari/))? sys.safari=s[1]:0; if(Sys.safari) {//        }    }

5.ios Add Home Screen icon

<Linkrel= "apple-touch-icon-precomposed"Sizes= "144x144"href= "Http://*/apple-touch-icon-144x144.png"><Linkrel= "apple-touch-icon-precomposed"Sizes= "120x120"href= "Http://*/apple-touch-icon-120x120.png"><Linkrel= "apple-touch-icon-precomposed"Sizes= "72x72"href= "Http://*/apple-touch-icon-72x72.png"><Linkrel= "apple-touch-icon-precomposed"href= "*/apple-touch-icon-57x57.png">
<meta name= "Apple-mobile-web-app-title" content= "official website" >

General knowledge of mobile phone projects

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.