Why do we need this?
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.