时间: 2020-09-9|tag:18次围观|0 条评论

window.onresize = function () { var ua = navigator.userAgent; var isAndroid = /android/i.test(ua); //android终端 if(isAndroid) {   if (document.activeElement.tagName == "INPUT" || document.activeElement.tagName == "TEXTAREA") {       window.setTimeout(function() {           document.activeElement.scrollIntoViewIfNeeded();       },0);   } }   }

文章转载于:https://www.jianshu.com/p/bc4ab3f154f5

原著是一个有趣的人,若有侵权,请通知删除

本博客所有文章如无特别注明均为原创。
复制或转载请以超链接形式注明转自起风了,原文地址《html 键盘遮挡问题
   

还没有人抢沙发呢~