开发者

Detect Xoom browser (Android)

How can I detect the Motorola Xoom browser with CSS Media?

e.g. for iPad开发者_运维技巧, I use @media only screen and (device-width:768px)

What is the similar media query for the Motorola Xoom browser?


@media only screen and (min-device-width: 800px) and (max-device-width: 1280px) { … }

See: http://webdesign.about.com/od/css3/a/css3-media-queries.htm


The screen resolution is 1280x800, so the width is either 1280 or 800:

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

or

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

So you can also use other layout depending on the device orientation.

Although, i wouldn't just rely on the device width. If you really want to detect the Xoom browser, your only possibility is to look at the user agent string, because there are many screens having this dimensions. For my websites i don't use special tablet versions, the tablet browsers are so good, they don't need extra care (unlike IE ;)). For my websites I design normal and mobile versions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜