Description : How to create a Scroll to top button with CSS ? -How To ?
Last Answer : documentElement returns the root element of the document. We need it to get the offset values. So, next let's save it in a variable called rootElement - that way it's easier to call in the ... inside the scrollToTop function, we will make it scroll to the top of the screen with the scrollTo method