0

I am trying to use some CSS that is exclusively for phones. I have tried to do something like this and seen similar suggestions elsewhere.

@media only screen and (max-device-width: 1136px)

The problem is newer phones (ie iPhone 5) have a resolution greater than not so old tablets (ie, iPad 2). Is there any better way to handle this? I don't want to include the resolution of every known phone as a check. Is a user agent check better?

4

2 回答 2

0

对此没有正确答案,但您可以使用一些标准查询。 http://twitter.github.com/bootstrap/scaffolding.html#responsive

于 2012-12-26T03:22:57.493 回答
0

用户代理也可以做到这一点,你可以使用 PHP 做到这一点

检查一下:检查是否从 iOS 设备访问 PHP 页面

于 2012-12-26T03:28:27.493 回答