JSFiddle - React, Tailwind, and code Playground

by isherwood

HTML

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<div class="container-fluid">
    <div class="row full-ht">
        <div id="page-top" class="col-xs-12 full-ht">
            <div id="top-down" class="top-down"> <i class="glyphicon glyphicon-chevron-down white huge hover-fade lighter animated bounceInDown"></i>
            </div>
            
            <div id="page-top-content" class="full-ht-content">
                 <h1>Welcome to My Site</h1>

                <p>This is home.</p>
            </div>
        </div>
    </div>
    
    <div class="row accent">
        <div class="col-xs-12">
            <div class="other-content">Other content</div>
        </div>
    </div>
    
    <div class="row">
        <div class="col-xs-12">
            <div class="still-more-content">Still more content</div>
        </div>
    </div>
</div>

CSS

.full-ht {
    height: 100vh;
    position: relative;
    background: lightblue;
}
.full-ht-content {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    margin-left: -15px;
    padding-left: 15px;
}
#top-down {
    position: absolute;
    bottom: 10px;
    left: 50%;
    margin-left: -24px;
    cursor: pointer;
    z-index: 9999;
}
.accent {
    background-color: pink;
}
.huge {
    font-size: 48px;
}
.hover-fade {
    opacity: .75;
    transition: all .25s;
}
.hover-fade.lighter {
    opacity: .5;
}
.hover-fade:hover {
    opacity: 1;
}
.white {
    color: #fff;
}
.other-content {
    padding: 50px 0;
}
.still-more-content {
    padding: 50px 0 1000px;
}
.container-fluid {
    background: lightgreen;
}
}

JavaScript

$('#top-down').click(function () {
    var pageHt = $(window).height();

    $('html, body').animate({
        scrollTop: pageHt
    }, 1000, 'swing');
});