Comment

Comment by 4lun

Animating scrollTop is quite a common effect that some developers/designers add (personally I'm not a fan).

Usually it's done using the jQuery animate function, meaning you can't take advantage of CSS transitions.

As you can't add a CSS transition onto the window scroll, this demo is useful as it shows a workaround that achieves the same effect using CSS transitions.

parent 4lun 13 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton