Droid 2 not detected by CSS @media query
I'm using the following CSS @media query to style my page for m开发者_StackOverflow中文版obile 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?
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
If you do max-device-width: 854px
it will always include 480px
.
Key word: Max
精彩评论