Answers for "javascript moving text from left to right onscroll"

0

javascript moving text from left to right onscroll

var text = document.querySelector("h1");
document.addEventListener("scroll", () => {
  text.style.left = window.scrollY * 5 + "px";
});
Posted by: Guest on March-20-2021

Code answers related to "javascript moving text from left to right onscroll"

Code answers related to "Javascript"

Browse Popular Code Answers by Language