iOS only CSS file?
Is there a way to include a CSS file that only works for iOS? Thanks.
It would be preferred if this is done browser side, although server s开发者_StackOverflowide detection could be a viable option if it works well enough (server is python flask based)
You can use CSS media queries:
http://www.mobilexweb.com/blog/iphone4-ios4-detection-safari-viewport
You could use some javascript
if((navigator.userAgent.match(/iPhone/i)) //Lines split for easy reading only
|| (navigator.userAgent.match(/iPod/i))
|| (navigator.userAgent.match(/iPad/i))){
//LINK TO YOUR STYLESHEET
}
精彩评论