CSS @media 查询未检测到 Droid 2
我正在使用以下 CSS @media 查询来为 iPhone 和 Android 等移动浏览器设计我的页面样式:
@media only screen and (max-device-width: 480px) {
// CSS here
}
但是,我的一位用户说它没有检测到他的 Droid 2 手机。他的用户代理字符串是:
Mozilla/5.0 (Linux; U; Android 2.2; en-us; DROID2 GLOBAL Build/S273) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.12011-07-18 05:34:59
What's up with that?
I'm using the following CSS @media query to style my page for mobile browsers like iPhone's and Android's:
@media only screen and (max-device-width: 480px) {
// CSS here
}
However, one of my users is saying that it's not detecting his Droid 2 phone. His user-agent string is:
Mozilla/5.0 (Linux; U; Android 2.2; en-us; DROID2 GLOBAL Build/S273) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.12011-07-18 05:34:59
What's up with that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Droid 2 的屏幕显然是 854x480,所以尝试一下(最大设备宽度:854px)。
参考:http://arstechnica.com/gadgets/reviews/2010/08/hands-on-motorolas-droid-sequel-is-a-worthy-update.ars
Droid 2's screen is apparently 854x480, so try (max-device-width: 854px).
ref: http://arstechnica.com/gadgets/reviews/2010/08/hands-on-motorolas-droid-sequel-is-a-worthy-update.ars
如果您设置
max-device-width: 854px
,它将始终包含480px
。关键词:最大
If you do
max-device-width: 854px
it will always include480px
.Key word: Max