开发者

Detection iPhone/iPad and changing CSS file

How to detect and change css file iPad,iPhone3G and i开发者_Python百科Phone 4 with javascript

thanks


you can change the CSS file based on the viewport width of device in this way:

< link rel="stylesheet" href="stylesheets/css/ipad.css" type="text/css" media=" all and (min-width: 741px) and (max-width: 1024px)" title="no title" />

< link rel="stylesheet" href="stylesheets/css/iphone.css" type="text/css" media=" all and (max-width: 740px)" title="no title" />

The code above checks the viewport width and decides which CSS file to use.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜