如何扩大用于移动设备的网站? [英] How to scale a website for mobile devices?

查看:130
本文介绍了如何扩大用于移动设备的网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常简单的静态页面(仅限于CSS和链接,没有任何脚本)。 它看起来不错的Andr​​oid和iPhone,但太小了。我猜他们把它更小,因为它大部分的网站工作。 我如何可以覆盖这一点,让他看起来我希望它是大小?

解决方案

Android的自动调整到您的网站的规模,尽量使用宽度:100%或小于周围310像素(滚动条需要空间等)正常视图模式<。 / P>

有关IPhone尝试使用这种code强制正确的尺寸

 &LT; META NAME =视口内容=WIDTH =设备宽度;初始规模= 1.0;最大规模= 1.0;&GT;
 

也很给力字体大小尝试使用此code在你的CSS:

  -webkit-文字大小调整:无;
 

I've a very simple static web page (only css and links, no scripts). It looks good on android and iphone, but too small. I'm guessing they put it smaller since it work for most of the sites. How can I override this and make him look the size I want it to be?

解决方案

Android automatically adjusts to the size of your site, try to use width:100% or smaller than around 310 pixels (scrollbar takes space) for normal viewmode.

For IPhone try using this code to force the correct size

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"> 

Also to force font-size try to use this code in your css:

-webkit-text-size-adjust: none;

这篇关于如何扩大用于移动设备的网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆