输入框焦点时让当前的元素滚动到浏览器窗口的可视区域内

 

onFocus() {
    let input = document.getElementById("input");
    input.scrollIntoView();
},

 

posted @ 2022-02-17 13:01  如意酱  阅读(138)  评论(0)    收藏  举报