javascript - Fading-in text on bottom of screen centered -
i want text shown on bottom middle of screen, keeps showing on bottom left of screen. doing wrong?
$('div').delay(2000).fadein(1000);
div.hidden { position: absolute; bottom: 0; display: none; text-align: center; }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div class="hidden"> <p>this text.</p> </div>
add width: 100%
css.
this causes div
span entire width of screen, when text centered, centered in screen.
wiki
Comments
Post a Comment