Simple Javascript smooth scroll - vertical only

You are reading Tutorial from Thichnet Blog
x
 
<style type="text/css">
#originalpost {position: fixed; top: 10px; background: #00ad62; padding: 5px;}#originalpost a { color: #fff; text-decoration: none;}
#container {
    height: 1500px;
    width: 1500px;
    display: grid;
    grid-gap: 500px;
    background: red; /* For browsers that do not support gradients */
    background: -webkit-linear-gradient(#eee, orange); /* For Safari 5.1 to 6.0 */
    background: -o-linear-gradient(#eee, orange); /* For Opera 11.1 to 12.0 */
    background: -moz-linear-gradient(#eee, orange); /* For Firefox 3.6 to 15 */
    background: linear-gradient(#eee, orange); /* Standard syntax */
}
#one, #two, #three {
    height: 100px;
    width: 100px;
    text-align: center;
    background: #fff;
    padding: 10px;
    margin: 10px;
}
</style>
<div id=container>
    <div id="one">
        <h1>one</h1>
        
        <a href="#one">one</a>
        <a href="#two">two</a>
        <a href="#three">three</a>
    </div>
    <div id="two">
        <h1>two</h1>
        
        <a href="#one">one</a>
        <a href="#two">two</a>