Please solve the problem so that when scrolling the site, the menu bar decreases in size?

  • 0
    JavaScript Anonymous, May 16, 2019

  • 1 Answers
  • 0
    document.addEventListener(`scroll`, () => {
    if (window.pageYOffset > 0) {
    navbar.classList.add(`menu-not-top`);
    }
    });
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!