What is better: CSS media queries or JQuery mobile?

前端 未结 3 1982
既然无缘
既然无缘 2021-01-07 09:13

I\'m newbie for developing mobile website. I very confused between two methods because I dont have any experience this it. Whats more better between two methods: css que

3条回答
  •  不知归路
    2021-01-07 09:20

    I will classify methods by their importance, from most important one to less important:

    Client side detection

    Using Modernizer javascript library to detect mobile / desktop environment

    Server side detection

    Using Modernizer Server or WURFL. Little complex then first solution but much more detailed (if you need more data about used device)

    CSS media queries

    Bad solution to detect desktop /mobile devices. Current mobile devices can have screen resolution equal to desktop platform

    JavaScript based browser sniffing

    Worst solution possible. Specially if you want to make distinction between smartphones and tablets.

    To find more about this solutions, read my other article/answer with examples: https://stackoverflow.com/a/15055352/1848600

提交回复
热议问题