Simple Javascript smooth scroll (2-dimensional)

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: 2000px;
    width: 2000px;
    display: grid;
    grid-template: 
        "a b c"
        "d e f"
        "g h i";
    grid-gap: 500px;
    background: red; /* For browsers that do not support gradients */
    background: -webkit-linear-gradient(red, yellow); /* For Safari 5.1 to 6.0 */
    background: -o-linear-gradient(red, yellow); /* For Opera 11.1 to 12.0 */
    background: -moz-linear-gradient(red, yellow); /* For Firefox 3.6 to 15 */
    background: linear-gradient(red, yellow); /* Standard syntax */
}
#one, #two, #three, #four, #five, #six, #seven, #eight, #nine {
    height: 160px;
    width: 160px;
    text-align: center;
    background: #ccc;
    padding: 10px;
    margin: 10px;
}