简体   繁体   English

设计移动设备的Web界面

[英]designing web interfaces for mobile devices

How do you make your website look good in both a standard browser and on the various mobile devices available? 如何在标准浏览器和可用的各种移动设备上使网站看起来不错?

Currently I am undecided between trying to make my layout resizable so that it will work for small devices, or providing a separate CSS for mobile devices. 目前,我不确定要调整布局的大小以使其适用于小型设备,还是为移动设备提供单独的CSS。 My use case is a chess game where I want the entire board to be available without scrolling down. 我的用例是一个国际象棋游戏,我希望整个面板都可用而不向下滚动。

What would you recommend? 你会推荐什么?

在这种特殊情况下,听起来似乎是最佳观看方式,可能值得专门针对移动设备。

I would recommend the CSS approach. 我建议使用CSS方法。 Otherwise, I fear you'll have an interface that will only look adequate in both and only mediocre at that. 否则,我担心您将拥有一个仅在这两个方面看起来都足够,并且在此方面仅中等的接口。

You don't want your site to look like it's compromised for one audience or the other. 您不希望自己的网站看起来像对一个或其他受众群体的危害。

I don't know if you realise how big a question you're asking -- "the various mobile devices"? 我不知道您是否意识到自己在问一个大问题-“各种移动设备”? That's a lot of devices, a lot of resolutions and a lot of bugs and limitations, all the way from iPhones, which can handle anything a normal browser can handle, to tiny little black-and-white screens. 从iPhone(可以处理普通浏览器可以处理的所有内容)到小小的黑白屏幕,一路都有很多设备,很多分辨率以及很多错误和局限性。

In theory, you can write separate CSS to target hand-held devices 从理论上讲,您可以编写单独的CSS来定位手持设备

<LINK REL="stylesheet" TYPE="text/css" MEDIA="handheld" HREF="handheld.css">

but personally, if you're trying to support a large number of devices I think detecting the device and trying to feed it code it can handle is the only real solution. 但是就我个人而言,如果您想支持大量设备,我认为检测设备并尝试将其提供的代码作为唯一真正的解决方案。

You can start looking at how big the problem is by getting WURLF which is a 13MB XML file of details about the different devices and their capabilities. 您可以通过获取WURLF开始查看问题的严重程度, WURLF是一个13MB的XML文件,其中包含有关不同设备及其功能的详细信息。

basically there is no easy way to do this, you can use CSS on most modern phones to control the output but you need to resize the images before they are displayed on the phone as all phones have different screen sizes. 基本上没有简单的方法可以执行此操作,您可以在大多数现代手机上使用CSS来控制输出,但是由于所有手机的屏幕尺寸都不同,因此您需要调整图片大小后才能在手机上显示。

The best site I have come across dealing within mobile design is : http://patterns.littlespringsdesign.com/index.php/Main_Page 我在移动设计领域遇到的最好的网站是: http : //patterns.littlespringsdesign.com/index.php/Main_Page

尝试使用Google全新的“ 移动友好”测试工具来评估您的网站1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM