Link to home
Start Free TrialLog in
Avatar of rpkhare
rpkhareFlag for India

asked on

How to animate till the time page loads?

Sometimes you might have seen that when you click a button on the webpage, a black transparent cover drops on the webpage and you need to wait till the page completely loads.

I either want to do this or show animation till all the images and controls on the webpage gets loaded. How to do this?
ASKER CERTIFIED SOLUTION
Avatar of animesxplosion
animesxplosion

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial

CSS:

#cover{
  position:absolute;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:#000;
  display:block;
  /*background:url(someanimation);*/
)


HTML:

<body onload="document.getElementById('cover').style.display='none'">
<div id="cover"></div>

...
...


</body>

Open in new window

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rpkhare

ASKER

Thanks