0

I put hundreds of div elements into the body element.So the html and body's height both equals 7400px. And I write the css for one of the divs like this;

#app{
  width: 100%;
  height: 100%;
  background: red;
  position: absolute;
  z-index: -999;
}

I wish it's height equals 7400px too,while it's height equals the browser window's height which is 967px; how can I make the #app element's heigt equals the html and body's height? I tried to write like this.And then the html and body's heigt equal the browser's height.

    html{
      height: 100%;
    }
    body{
      height: 100%;
    }

How can I make the div's height equals the body's height with css?

Jing
  • 1

0 Answers0