javascript - Preloader fade out and content fade in -
i'm sure easy fix. need preloader fade out slowly. tried css animation didn't work. can tell me how should in javascript ? can see in example, transition rough. don't want that.
<script> <!--preloader--> var myvar; function preloader() { myvar = settimeout(showpage, 1500); } function showpage() { document.getelementbyid("preloader").style.display = "none"; document.getelementbyid("wrapper").style.display = "block"; } </script>
add following changes codes.
#preloader { transition:1s ease; } #wrapper { opacity:0;/*remove display , hide opacity*/ } function showpage() { document.getelementbyid("preloader").style.opacity = 0; document.getelementbyid("wrapper").style.opacity = 1; }
Comments
Post a Comment