Safari on iOS 支持的4种Meta Tags

    苹果公司在文档Safari HTML Reference中列举了iOS中Safari所支持的4种Meta Tags.他们分别是:apple-moblie-web-app-capable、apple-mobile-web-app-status-bar-style、format-detection和viewport。这些Tags属于Safari对HTML的扩展。

    apple-moblie-web-app-capable:iOS2.1及之后的系统中可以使用它设置web应用程序全屏运行,语法如下

        <meta name="apple-mobile-web-app-capable" content="yes">

    apple-mobile-web-app-status-bar-style:iOS2.1及之后的系统中可以使用它设置Web程序的状态条样式,必须先应用上述apple-moblie-web-app-capable标记让应用程序处于全屏,该处设置才会有效。语法如下

        <meta name="apple-mobile-web-app-status-bar-style" content="black">

    format-detection:iOS1.0及以后的系统,可以使用它允许或禁止在网页中自动检测电话号码,语法如下

        <meta name="format-detection" content="telephone=no">

    viewport:iOS1.0及以后的系统,展示网页时使用它改变逻辑网页窗口尺寸,语法如下

        <meta name = "viewport" content = "width = 320,       initial-scale = 2.3, user-scalable = no">

    在针对iOS开发Web应用的过程中,用到format-detection和viewport的场合可能会比较多,如在一些使用UIWebView的应用中并不希望检测电话号码,则可以通过设置format-detection来实现,或者是针对iPad开发的Web程序,通过viewport设置浏览视窗的尺寸等等。

    关于iOS平台上Safari所支持特性的更详细信息可以从Apple官方Safari Developer Library的Safari HTML Reference中获取。

       

你可能感兴趣的:(html,ios,Web,Safari,reference,tags)