0

html (jade)

body
 .divx
  .divy

Given css:

.divx {
  width: 200px;
  height: 200px;
}

What css property of class .divy will make it cover 100% width and height of body?

If i make

.divy {
  width: 100%;
  height: 100%;
}

The above makes .divy cover 100% of .divx not body

4

1 回答 1

0

您可以使用位置absolute

jsFiddle here

.divy {
    position:absolute;
    top:0;
    left:0;
    width: 100%;
    height: 100%;
}
于 2013-11-06T15:51:36.807 回答