快速滚动到顶部和底部的js方法
// 平滑的滚动到底部 const scrollToBottom = (element) => element.scrollIntoView({ behavior: "smooth", block: "end" }); // 平滑的滚动到顶部 const scrollToTop = (element) => element.scrollIntoView({ behavior: "smooth", block: "start" });
// 平滑的滚动到底部 const scrollToBottom = (element) => element.scrollIntoView({ behavior: "smooth", block: "end" }); // 平滑的滚动到顶部 const scrollToTop = (element) => element.scrollIntoView({ behavior: "smooth", block: "start" });