赞
踩
用js的resize()方法对浏览器窗口调整大小进行计数:览器窗口的大小时,发生 resize 事件。就可以解决
window.addEventListener('resize', () => {
if (document.activeElement.tagName == 'INPUT') {
window.setTimeout(() => { document.activeElement.scrollIntoViewIfNeeded();
}, 100);
}
})
转自:https://blog.csdn.net/weixin_43549408/article/details/84986323
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。