【问题标题】:CSS / JS to differentiate between tablet / ipad and smartphone?CSS / JS 来区分平板电脑 / ipad 和智能手机?
【发布时间】:2015-01-21 21:19:12
【问题描述】:

我看过这个帖子

What is the best way to detect a mobile device in jQuery?

但它没有解决如何确定设备是平板电脑还是智能手机的问题。

ipod 或 ipad 好的。但是有适用于平板电脑和智能手机的安卓设备

有没有办法,如果有,怎么做?

【问题讨论】:

  • “有办法吗?” 是的,通过解析useragent。
  • @KevinB 我在提到的线程中读到,不,这似乎不是区分安卓智能手机和安卓平板电脑的方法

标签: javascript android css tablet smartphone


【解决方案1】:

使用 CSS media queries 根据设备的viewport size 调整布局。

【讨论】:

    猜你喜欢
    • 2014-03-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-14
    • 1970-01-01
    • 2013-04-09
    • 1970-01-01
    相关资源
    最近更新 更多