做手机站的尺寸解决方案

做手机站的尺寸解决方案:
1、宽度我们以百分比来定义设置最大宽度640px 将body的宽度设置为:max-width:640px;不管设备屏幕多大都按设定的百分比来显示;
2、在head中添加<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0" />或者添加<meta content="width=device-width,user-scalable=no" name="viewport">
做手机站的导航固定问题解决方案:
1、<div class="header">这里放头部的导航内容</div>
2、在css中添加样式 .header{ height:70px; position:fixed; _position:absolute; right:0px; left:0px; background:#fff; z-index:99; }
posted @ 2017-11-27 13:27  huohuohiahia  阅读(231)  评论(0编辑  收藏  举报