JavaScript HTML5 Mobile Website Basic features

Source: Internet
Author: User
<span id="Label3"></p><p><p>Make the width of the Web page Adaptive screen <meta name= "viewport" content= "width=device-width"/><br>1) add <meta name= "viewport" content= "initial-scale=1.0,user-scalable=no" on html/><br>Make sure the Web page works<br>2) Add the following statement to make the Web page run better on Apple devices<br><meta name= "apple-mobile-web-app-capable" content= "yes"/><br><meta name= "apple-mobile-web-app-status-bar-style" content= "black"/><br><meta content= "black" name= "apple-mobile-web-app-status-bar-style"/><br>3) Add this phrase to define the Iphone's icon added to the home screen<br><link rel= "apple-touch-icon" href= "/images/logo.png"/></p></p><p><p></p></p><p><p>Autocomplete= "off"//remove The history of the input box</p></p><p><p>Queryselector returns only the first element that matches, and returns null if there are no matches.<br>Queryselectorall returns a collection of matched elements, and returns an empty nodelist (node array) If there are no matches.</p></p><p><p></p></p><p><p><!------IE8 and the following solutions do not support HTML5------><br><!--[if ie]><br><script src= "http://html5shiv.googlecode.com/svn/trunk/html5.js" ></script><br><! [endif]--></p></p><p><p><meta name= "viewport" content= "width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0 "/>//control Phone full screen: forces the width of the document to remain 1:1 with the width of the device, and the maximum width of the document is 1.0, and does not allow the user to click on the screen to enlarge the view<br>Viewport: viewable Area<br>Initial-scale: Initial Zoom ratio; user-scalable: whether the user can zoom manually;<br>Minimum-scale: The minimum scale that allows the user to scale; maximum-scale: maximum scale allowed for user scaling</p></p><p><p><meta name= "format-detection" content= "telephone=no"/>//does not display a string of numbers (phone Numbers) in a Web page as a dial-up hyperlink, by default Telephone=yes</p></p><p><p><meta name= "apple-mobile-web-app-capable" content= "yes"/>//delete mo recognized Apple menu bar and toolbar, If you need the Apple menu bar and toolbar can not add</p></p><p><p><meta name= "apple-mobile-web-app-status-bar-style" content= "default"/>//control status bar style content has three values: default, black, Black-translucent</p></p><p><p><link rel= "apple-touch-icon" href= "res/images/icon.png"/>//add icon Definition properties to the Mobile Site-mobile Web collection ("add to desktop Icon")<br>Apple-touch-icon: Add High-gloss Glossy icons<br>Apple-touch-icon-precomposed: Design Original icon</p></p><p><p>Web page for different screen resolution changes, with-webkit-device-pixel-ratio This media tag or in JS Window.devicepixelratio this method, set the target-densitydpi tag and the device-dpi Property. This gives you more flexibility in your customizations.</p></p><p><p></p></p><p><p>JavaScript HTML5 Mobile Website Basic features</p></p></span>

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.