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" />
<link rel="apple-touch-icon" href="./logo.png"/>
有更好的东西,大家来评论一下,学习学习。谢谢!