HTML5手机端开发-适配手机端浏览器1

来源:互联网 发布:linux vnc no matching 编辑:程序博客网 时间:2024/06/05 14:38

1、如何网页的宽度自适应屏幕?

     在head标签里添加以下代码:

<meta name="viewport" content="width=device-width"/>

2、在html加入以下代码确保手机的特效。

<meta name="viewport" content=" initial-scale=1.0,user-scalable=no" />

3、 加上以下代码可使网页在苹果设备上运行更好

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


4、加入这句话可以定义iphone的添加到主屏幕的图标
<link rel="apple-touch-icon" href="./logo.png"/>





有更好的东西,大家来评论一下,学习学习。谢谢!


















0 0
原创粉丝点击