哪个更好:CSS 媒体查询或 JQuery 移动? [英] What is better: CSS media queries or JQuery mobile?

查看:24
本文介绍了哪个更好:CSS 媒体查询或 JQuery 移动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是开发移动网站的新手.我在两种方法之间很困惑,因为我没有任何经验.两种方法之间哪个更好:当我们在 css 文件中使用所有宽度设备时的 css 查询使用 jquery mobile 使用 php 技术为使用桌面或移动的不同用户提供 [用户->php?->移动使用jquery移动/桌面使用css标准]?

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 query when we using all of width device in css file or using jquery mobile that use php technique for differented user that use desktop or mobile [user->php?->mobile use jquery mobile/desktop use css standard]?

非常感谢您的回答

推荐答案

我将按重要性对方法进行分类,从最重要的到最不重要的:

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

使用 Modernizer javascript 库检测移动/桌面环境

Using Modernizer javascript library to detect mobile / desktop environment

使用 Modernizer ServerWURFL.第一个解决方案有点复杂,但要详细得多(如果您需要有关所用设备的更多数据)

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

检测桌面/移动设备的错误解决方案.当前移动设备的屏幕分辨率可以与桌面平台相同

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

最糟糕的解决方案.特别是如果您想区分智能手机和平板电脑.

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

要了解有关此解决方案的更多信息,请阅读我的其他文章/带有示例的答案:https://stackoverflow.com/a/15055352/1848600

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

这篇关于哪个更好:CSS 媒体查询或 JQuery 移动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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