Answers for "how to automatically scroll section to top in html"

1

html scroll div to top

var myDiv = document.getElementById('containerDiv');
myDiv.innerHTML = variableLongText;
myDiv.scrollTop = 0;
Posted by: Guest on June-07-2020
0

scroll to a section of your page html

html {
  scroll-behavior: smooth;
}
Posted by: Guest on December-12-2020

Code answers related to "how to automatically scroll section to top in html"

Browse Popular Code Answers by Language