How to make a smooth transition to a section?

  • 0
    In the HTML file, I added the link href = "# collection", which, when you click on the link, takes you to the "collection" section. It happens instantly, but I need it smoothly. Found the answer in the open spaces of Habr, but javascript is used there. If anyone knows how to do this in pure html / css I would be very grateful. If you don’t know, please post the javascript version (if you know it, of course). Thank you in advance.
    JavaScript Violet Hicks, Feb 19, 2019

  • 2 Answers
  • 0
    scroll-behavior: smooth;

    and it will be smooth

  • 0

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