听起来很像..
是否有一些神奇而简单的说法:
if (user agent is iOS) {
if (browserRatio >=1.5) {
$container.css('min-height', '360px');
} else {
$container.css('min-height', '555px');
}
}
最佳答案
找到了。
if (navigator.userAgent.match(/(iPod|iPhone|iPad)/)) {
if (browserRatio >=1.5) {
$container.css('min-height', '360px');
} else {
$container.css('min-height', '555px');
}
}
关于jquery - 在 jQuery if/then 语句中识别 iOS 用户代理的简单方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7411662/