📜  通过 javascript 代码示例滚动

📅  最后修改于: 2022-03-11 15:01:28.203000             🧑  作者: Mango

代码示例3
var element = document.getElementById("box");

element.scrollIntoView();
element.scrollIntoView(false);
element.scrollIntoView({block: "end"});
element.scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"});