调整上边距
/* 订单填写页面样式 */
.order-fill {
padding-top: 44px;
}
.ios .order-fill {
padding-top: 64px;
}
.iphoneX .order-fill {
padding-top: 88px;
}
template.html
<script>
const u = navigator.userAgent;
const isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
if(isiOS){
document.body.className="ios";
if(screen.width === 375 && screen.height === 812){
document.body.className += ' iphoneX';
}
}
</script>
iphonex
Mozilla/5.0 LVMM (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/600.1.3 (KHTML, like Gecko) Version/8.0 Mobile/12A4345d Safari/600.1.4