前面有一篇文章介绍了HTML5的一些新特性以及技巧, 现再来总结一些更多的针对webkit的HTML, CSS和Javascript方面的特性.
HTML, 从HTML文档的开始到结束排列:
XML/HTML Code复制内容到剪贴板
- <meta name=”viewport” content=”width=device-width, initial-scale=1.0″/>
- <!--让内容的宽度自适应为设备的宽度, 在做Mobile Web时必须加的一条 -->
- <meta name=”format-detection” content=”telephone=no”]]>
- <!--禁用手机号码链接(for iPhone) -->
- <link rel=”apple-touch-icon” href=”icon.png”/>
- <!--设置你网页的图标, 尺寸为57X57 px -->
- <!– iOS 2.0+: tell iOS not to apply any glare effects to the icon –>
- <link rel=”apple-touch-icon-precomposed” href=”icon.png”/>
- <!– iOS 4.2+ icons for different resolutions –>
- <link rel=”apple-touch-icon” sizes=”72×72″ href=”touch-icon-ipad.png” />
- <link rel=”apple-touch-icon” sizes=”114×114″ href=”touch-icon-iphone4.png” />
- <link rel=”apple-touch-startup-image” href=”startup.png”>
- <!--全屏启动时候的启动画面图像, 尺寸320X460 px -->
- <meta name=”apple-mobile-web-app-capable” content=”yes” />
- <!--是否允许全屏显示, 只有在桌面启动时可用 -->
- <meta name=”apple-mobile-web-app-status-bar-style” content=”black” />
- <!--控制全屏时顶部状态栏的外观, 默认白色 -->
- <input autocorrect=”off” autocomplete=”off” autocapitalize=”off”>
- <!--取消自动完成, 自动大写单词字母(适用于Mobile上) -->
- <input type=”text” x-webkit-speech />
- <!--语音输入 -->
- <input type=”file” accept = “image/*; capture=camera” />
- <!--文件上传, 从相机捕获媒体, 下同 -->
- <input type=”file” accept = “video/*; capture=camcorder” />
- <input type=”file” accept = “audio/*; capture=microphone” />
- <a href=”sms:18005555555,18005555556″]]>
- <!--发送短信给多个人的链接 -->
- <a href=”sms:18005555555?body=Text%20goes%20here”]]>
- <!--发送短信附带内容的链接 -->
- <a href=”tel:18005555555″]]>Call us at 1-800-555-5555</a]]>
-