有没有一种万无一失的方法来判断设备是手机、平板电脑还是电脑?
这个问题与: 什么是好的用户代理解析插件对于 django
我有三种布局样式:一种用于 PC 浏览器,一种用于平板电脑,一种用于手机。
smartagent 插件可以告诉我该设备是否是移动设备,但有几个问题:
- 有些平板电脑显示为移动设备(Galaxy Tab),有些则不然(iPad、Playbook)
- 如果某物不是移动设备,我如何确定它是 PC 还是平板电脑?
有没有确定的方法可以找出设备类型?
谢谢
This question is related to: What's a good User-Agent parsing plugin for django
I have three layout styles: one for PC browsers, one for tablets, and one for mobiles.
The smartagent plugin can tell me whether the device is a mobile device, but there are several issues:
- Some tablets show up as a mobile device (Galaxy Tab) and some don't (iPad, Playbook)
- If something is not a mobile device, how can I be sure its a PC versus a tablet?
Are there any sure ways of finding out what is the device type?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能有兴趣查看foundation.zurb.com,
它将允许您根据设备宽度调整样式,并为手机、平板电脑和台式机提供预设样式。
编辑:Bootstrap 2.0 现在还允许响应式设计 http://twitter.github.com/bootstrap/
You might be interested in checking out foundation.zurb.com
It will allow you to adapt the styling according to the device width, with preset style for phones, tablets, and desktops.
Edit: Bootstrap 2.0 now also allows for responsive design http://twitter.github.com/bootstrap/