Android 优化手机网页
我试图让我的网页显示放大,当用户浏览到它。整个页面应仅为320px宽对齐,将所有内容保留在一列中。但是当我进入页面时,网站看起来并不好,直到浏览者点击屏幕进行缩放,甚至可以水平滚动(什么也看不见) 如何自动缩放页面? 我应该把所有东西都对准中心吗 我的css和html如下所示:Android 优化手机网页,android,html,css,mobile,Android,Html,Css,Mobile,我试图让我的网页显示放大,当用户浏览到它。整个页面应仅为320px宽对齐,将所有内容保留在一列中。但是当我进入页面时,网站看起来并不好,直到浏览者点击屏幕进行缩放,甚至可以水平滚动(什么也看不见) 如何自动缩放页面? 我应该把所有东西都对准中心吗 我的css和html如下所示: * { margin: 0; padding: 0; } body.body_sp{background-image:url(../images/content_sp.jpg);background-repeat:
* {
margin: 0;
padding: 0;
}
body.body_sp{background-image:url(../images/content_sp.jpg);background-repeat:repeat-x;background-repeat:repeat-y;width:320px;}
#head_sp{width:320px;height:127px;}
#content_sp{width:320px;}
#footer_sp{width:320px;}
h1.sp_h1{margin:10px 0 20px 5px;text-align:left;}
p.sp_p{margin:20px;letter-spacing:.5px;line-height:16px;font:13px arial;}
p.sp_p a{color:red;}
你可以在这里看到我的html尝试将这些添加到你的
<meta name="viewport" content="width=320; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
我确实把它设置好了。对不起,上面的代码一定是在我取出测试时出现的。我会重新编辑它。