CSS Smooth scrolling

PHOTO EMBED

Thu Dec 17 2020 00:32:33 GMT+0000 (UTC)

Saved by @DBZFYAM #css

// Animate scrolling only if users don’t prefer reduced motion
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
  
	// Add some spacing between the target and the top of the viewport
	:target {
		scroll-margin-top: 0.8em;
	}
}
content_copyCOPY

https://css-tricks.com/slow-movement/