after the project is opened in ipad, it is found that the effective position of the click button is different from the display position. ~
for example, when you click the login button, you have to click about the location above to trigger the login event, but there is no problem on the mobile side and pc. Do you know what the problem is?
this is my adaptation code
var phoneWidth = parseInt(window.screen.width);
var phoneScale = phoneWidth / 640;
var ua = navigator.userAgent;
if (/OKchexian/.test(ua) || /MicroMessenger/.test(ua)) {
if (/Android (\d+\.\d+)/.test(ua)) {
var version = parseFloat(RegExp.$1);
var chromeVersion = 0;
if (/Chrome\/(\d+\.\d+)/.test(ua)) {
chromeVersion = parseFloat(RegExp.$1);
}
// andriod 2.3
if (version > 2.3 && chromeVersion < 40.0) {
document.write("<meta name="viewport" content="width=640, minimum-scale = " + phoneScale + ", maximum-scale = " + phoneScale + ", target-densitydpi=device-dpi">");
// andriod 2.3
}
else {
document.write("<meta name="viewport" content="width=640, target-densitydpi=device-dpi">");
}
//
} else {
document.write("<meta name="viewport" content="width=640, user-scalable=no,target-densitydpi=device-dpi">");
}
} else {
document.write("<meta name="viewport" content="width=640, minimum-scale = " + phoneScale + ", maximum-scale = " + phoneScale + ", target-densitydpi=device-dpi">");
}