Add CSS transition to top function

It's nicer to have a transition when the page scrolls top.