我的网站的移动版本,什么设计宽度是最佳的? [英] Mobile version of my website, what design width is optimal?

查看:18
本文介绍了我的网站的移动版本,什么设计宽度是最佳的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建网站的移动版本...

I'm going to create mobile version of website...

我应该为设计选择什么宽度?我知道每个设备都有自己的屏幕宽度,很难适应所有设备......

What width should I choose for design? I know that every device have it's own screen width and it's really difficult to fit all devices...

我真的很困惑(对移动网站世界很陌生),请帮忙.

I'm really confused (pretty new to mobile websites world), please help.

谢谢.

推荐答案

您的方法将取决于您想要(或可以)为此付出多少努力以及您想要定位的移动用户范围.为了最小的努力,只需像 KennyTM 指出的那样使用 100% 并期望您的网站在 128px 到 480px 的屏幕宽度上浏览.使用这种方法,您还需要避免使用高级"xhtml 指令,例如 css 和 divs(和 javascript),因为大多数移动浏览器无法处理这些指令的某些方面.计划使用表格来管理布局.

Your approach will depend on how much effort you want to (or can) put into this and what range of mobile users you want to target. For minimal effort, simply use 100% as KennyTM points out and expect your website to be browsed on screen widths from 128px to 480px . With this approach, you'll also need to avoid 'advanced' xhtml directives such as css and divs (and javascript) because most mobile browsers cannot handle some aspects of these. Plan to use tables to manage layout.

对于更高级的方法,您可以使用名为 WURFL 的开源项目(http://wurfl.sourceforge.net/),它是移动浏览器及其功能(屏幕宽度、对 div、css、图像等的支持...)的数据库.它有一个名为 WNG 的 jsp 标签库,您只需在其中编写一次,标签库将呈现最合适的 html 以匹配用户的设备.我相信还有一个 PHP 库.

For a more advanced approach, you can use an open source project called WURFL (http://wurfl.sourceforge.net/) which is a database of mobile browsers and their capabilities (screen width, support for div, css, images etc...). It has a jsp tag library called WNG where you write once and the tag lib will render the most appropriate html to match the user's device. I believe there is also a PHP library for this.

Rgds,凯文.

这篇关于我的网站的移动版本,什么设计宽度是最佳的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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