Is it possible to slow down the scroll speed on certain divs or even just the whole page by using just react?
use refs
Checkout the answer here: How to window.scrollTo() with a smooth effect
const btn = document.getElementById('elem');
btn.addEventListener('click', () => window.scrollTo({
top: 400,
behavior: 'smooth',
}));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.