📜  javascript从左到右滚动文本 - Javascript代码示例

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

代码示例1
var text = document.querySelector("h1");
document.addEventListener("scroll", () => {
  text.style.left = window.scrollY * 5 + "px";
});