const el= document.querySelector('#managerCode');
el.scrollIntoView(true);
Element
接口的 scrollIntoView() 方法会滚动元素的父容器,使被调用 scrollIntoView() 的元素对用户可见。
const el= document.querySelector('#managerCode');
el.scrollIntoView(true);
Element
接口的 scrollIntoView() 方法会滚动元素的父容器,使被调用 scrollIntoView() 的元素对用户可见。
本文标题:scrollIntoView-保持DOM节点在视窗内显示
本文链接:https://www.haomeiwen.com/subject/gasfzrtx.html
网友评论