app.brand
nav.index
nav.about
user.sign.in
解决iOS12以上微信内置浏览器环境键盘收起底部空白问题
尝试了好几种方式,都不是很完美,最后使用了以下方案,但仍有可能造成输入框弹起时即刻执行修补,导致输入框覆盖了被输入对象的情况,不过基本都解决了,蛮好的。 ```javascript document.body.addEventListener('focusout', () => { //软键盘收起的事件处理 let ua = window.navigator.userAgent; let app = window.navigator.appVersion; //console.log('浏览器版本: ' + app + '\n' + '用户代理: ' + ua); if (!!ua.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)) { console.log('ios端'); var currentPosition, timer; var speed = 1; //为了防止快速input切换导致闪屏,间隔100毫秒执行 timer = setInterval(function () { currentPosition = document.documentElement.scrollTop || document.body.scrollTop; currentPosition -= speed; window.scrollTo(0, currentPosition); //页面向上滚动 currentPosition += speed; window.scrollTo(0, currentPosition); //页面向下滚动 clearInterval(timer); }, 100); } else if (ua.indexOf('Android') > -1 || ua.indexOf('Adr') > -1) { //console.log('android端'); } }); ```
data.update.last
sys.time.ago
punc.commaarticle.create.bypunc.commaarticle.file.inpunc.colon
JavaScript
punc.caesura
iOS
©app.copyright.year
app.author
·
app.ICP
sys.donate
alipay._self
wechat._self