开发手机网页的最佳实践 [英] best practice for developing webpage for mobile phone

查看:78
本文介绍了开发手机网页的最佳实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何制作一个在大多数手机上看起来都不错的网页. 为了制作正常的网页,我使用Dreamweaver CS3. 除非我也真的不想使用模拟器. 我不仅可以将所有内容居中放在中间,而且在两边都有自动页边距.

I would like to know how I can make a webpage that will look good in most mobile phones. For making normal webpages, I use dreamweaver cs3. I don´t really want to use emulators unless I have too. Can I not just center everything in the middle, with auto margins on both sides.

当我查看自己制作的页面时,它们看起来还不错, 但是在手机中,有些东西会聚在一起. 我打算删除所有非必需信息和标记,以便在手机上使用.

When I am looking at the pages that I have made sofar, they look ok, but in a mobile phone some things get cluthered. I am planning to strip out all the non essential information and markup for use on the mobile phone.

然后是一个问题,基本上是现在对我来说最重要的一个问题

Then there is the question, basicly the most important one for me now

如果手机转到相同的地址,如何显示不同的页面?

How to present a different page if the mobile phone go´s to the same address?

修改

我没有得到最后一个答案,但是我找到了可以使用的浏览器检测脚本.

I diddn´t get an answer om the last one, but I found a browser detection script that I could use.

谢谢,理查德

推荐答案

为了获得最大程度的兼容性,您必须舍弃大多数台式计算机上运行的浏览器,以平衡运行为代价.磨.

In order to get the greatest amount of compatibility, you have to trade it off with ditching most of the bells and whistles browsers running on desktop computers consider run of the mill.

  • 使用XHTML文档声明移动文档类型,并确保标记和styleheets有效.
  • 让您的CSS真正简单.否:悬停,请勿在设计中使用图片,限制使用固定大小/边距的图片.
  • 乳化剂的测试效率不如实际设备本身.使用Wifi/蓝牙PAN的电话可以使生活更便宜,但是通过运营商网络进行测试也可以帮助您更好地了解速度和延迟.
  • 没有典型设备",但是如果您可以在不使用webkit的CSS插件的情况下使网站在webkit下看起来确实不错,那么您已经涵盖了很大一部分设备(诺基亚S60,iPhone,Android等).使用Opera Mini,您将进一步扩展该功能.
  • 尽可能紧凑您的输出.最终用户不仅会受到屏幕和CPU处理的限制,而且很可能会受到网络的限制.将数据推送给他们的速度越快,网站的速度就会越慢.
  • Declare the mobile doctype with your XHTML documents, and make sure your markup and styleheets are valid.
  • Keep you CSS real simple. No :hover, don't use images as part of the design, limit your usage of fixed sizes/margins.
  • Emulators aren't as effective for testing as the actual devices themselves. Phones that do Wifi/Bluetooth PAN can make life cheaper, but testing over carrier's network will also help you get a better understanding of the speed and latency.
  • There is no "typical device", but if you can get your website looking really good under webkit without using webkit's CSS addons, you've covered a huge chunk of devices (Nokia S60, iPhone, Android etc). Work with Opera Mini, and you'll expand that chunk even more.
  • Compact your output as much as possible. Not only are your end users going to be screen and CPU processing limited, they are most likely going to be limited by network. The faster you can push out your data to them, the less-sluggish your website will feel.

这篇关于开发手机网页的最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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