Mobile phone-side H5 adapter <mete> label

Source: Internet
Author: User

Apple-mobile-web-app-capable

Sets whether the web app runs in full-screen mode.

Grammar:
<meta name= "apple-mobile-web-app-capable" content= "yes" >
Description
If the content is set to yes,web the app will run in full-screen mode, or vice versa. The default value for content is no, which indicates normal display. You can use the read-only property window.navigator.standalone to determine whether a Web page is displayed in full-screen mode.
Compatibility:
IOS 2.1 +
Apple-mobile-web-app-status-bar-style

Set the style of the Web app's status bar (the top bar of the screen)

Grammar:
<meta name= "Apple-mobile-web-app-status-bar-style" content= "blank" >
Description

This meta tag will not work unless you first use apple-mobile-web-app-capable to specify full-screen mode.

If content is set to default, the status bar is displayed correctly. If set to blank, the status bar will have a black background. If set to Blank-translucent, the status bar appears as black translucent. If set to default or blank, the page appears below the status bar, where the status bar occupies the upper part, and the page occupies the lower part, which does not obscure or obscure the other. If set to Blank-translucent, the page fills the screen, where the top of the page is obscured by the status bar (which overrides the 20px height of the page, while the Retina screen for iphone4 and ITOUCH4 is 40px). Defaults are default values.

Compatibility
IOS 2.1 +
Format-detection

Starts or disables the phone number in the auto-identify page.

Grammar:
<meta name= "format-detection" content= "Telephone=no" >
Description
By default, the device automatically recognizes any string that might be a phone number. Setting Telephone=no can disable this feature.
Compatibility
IOS 1.0 +
Viewport
Grammar:
<meta name= "viewport" content= "Width=230,initial-scale=2.3,user-scalable=no" >
Description

Use the viewport meta tag to improve the performance of your page on your device, typically by setting the width and initial scale of the viewport (viewport).

For example, if the width of the page is less than 980px, you can set the viewport width to fit the page. If you are developing a Web application, you should set the width of the viewport to the width of the device.

Table 1 describes the properties supported by the viewport META tag and their default values. When there are multiple properties, you should use commas to separate assignment expressions. When setting multiple properties, follow these rules:

  • do not use semicolons as delimiters.
  • spaces can also be used as separators, but it is best to use commas.
  • is a property whose value is a number, and if the property value contains a non-numeric character but begins with a number, only the part of the number is treated as a property value. For example, 1.0x is equivalent to 1.0,123x456 equivalent to 123. If the argument does not start with a number, the property has a value of 0.

When you want to use the dimension data for a device, you can use the constants in table 2 instead of numeric values. For example, replace 320 (width) with device-width, and replace 480 (height) with device-height.

You do not need to set each property, and the property that is not set automatically takes the default value.

Sets the width of the viewport to the width of the device:

<meta name= "viewport" content= "width=device-width";

Set initial zoom ratio to 1.0:

<meta name= "viewport" content= "initial-scale=1.0";

Sets the initial scale and disables user scaling.

<meta name= "viewport" content= "initial-scale=2.3, User-scalable=no"

Sets the width of the viewport to the width of the device, maximum and minimum scaling, Prohibit user scaling (common)

<meta name= "viewport" content= "Width=device-width, minimum-scale=1.0, maximum-scale=1.0, User-scalable=no ";

Compatibility
IOS 1.0 +
Table 1 Viewport Properties
Properties Description
Width The width of the viewport. The default value is 980, the value range is 200 to 10000, or the value is constant device-width.
Height The height of the viewport. The default value is calculated based on the value of width and the aspect ratio of the device, ranging from 223 to 10000, or to a constant device-height value.
Initial-scale The initial zoom ratio of the viewport. The default value depends on the scale of the page's full screen, and the range of values depends on Minimum-scale and Maximum-scale.
Minimum-scale The minimum zoom ratio for the viewport. The default value is 0.25, and the value range is >0 to 10.0.
Maximum-scale The maximum scale of the viewport. The default value is 5.0, and the value range is >0 to 10.0.
User-scable Sets whether the user can scale the viewport. Yes, no means no, the default value is yes. Setting User-scable to no prevents the page from scrolling when the user enters text in the input label's text field.

Table 2 Special Viewport property values
Property Value Description
Device-width The width of the device (in pixels).
Device-height The height of the device (in pixels).

Mobile phone-side H5 adapter <mete> label

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.