有没有一种万无一失的方法来判断设备是手机、平板电脑还是电脑?

发布于 2024-12-21 18:11:35 字数 470 浏览 1 评论 0原文

这个问题与: 什么是好的用户代理解析插件对于 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

南冥有猫 2024-12-28 18:11:35

您可能有兴趣查看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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文