Skip to content
Advertisement

Implement element.scrollIntoView with scrollTo

How to implement

JavaScript

using widnow.scrollTo({behavior: 'smooth', top: ??})?

I have created some Sandbox. I need to scroll exactly the same position as using scrollIntoView

Advertisement

Answer

Based on this answer

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement