JSFiddle - React, Tailwind, and code Playground

by Sean Wessell

HTML

<div class="container">
    <div class="temp-message alert alert-warning">you can scroll up or down</div>
</div>

CSS

html {
    height:1000px;
    background: -webkit-linear-gradient(black, lightgrey);
    /* For Safari 5.1 to 6.0 */
    background: -o-linear-gradient(black, lightgrey);
    /* For Opera 11.1 to 12.0 */
    background: -moz-linear-gradient(black, lightgrey);
    /* For Firefox 3.6 to 15 */
    background: linear-gradient(black, lightgrey);
    /* Standard syntax */
}
.temp-message {
    position:fixed;
    top:50%;
    width:80%;
}

JavaScript

$('html,body').animate({
       scrollTop: $(window).scrollTop() + 1000
   }, 1800, function () {
       $('html,body').animate({
           scrollTop: 0
       }, function () {
           $('.temp-message').fadeOut();
       });

   })