元素在当前窗口可视的区域---Element.scrollIntoView()

element.scrollIntoView(); // 等同于element.scrollIntoView(true) 
element.scrollIntoView(alignToTop); // Boolean型参数 
element.scrollIntoView(scrollIntoViewOptions); // Object型参数

猜你喜欢

转载自www.cnblogs.com/nieliangcai/p/11576788.html