0

As the title says, I want to load a div in WordPress before any other content on the site. I'll explain it better: when a user loads the page, I want to show an animated intro, and then let him see the site after. How can I do that?

user3004586
  • 47
  • 1
  • 1
  • 8

1 Answers1

1

You'll want to create a fixed div that covers the screen to act as an overlay. Say you have a div: <div class="overlay">.

Now, in your CSS, you want to make that div take up the whole screen:

.overlay {
  height: 100%;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

You also need to make sure your parent containers (html and body, most likely) have width/height of 100%. You might want to give your div another color so you can see it. Also, reference this question.