Here your are facing two issues. First you have to consider that by making the .parent
element absolute position, you remove it from the flow and since it's the only child of the body this one will have a height equal to 0.
Considering this the background may still work in some cases. If you use a background-color
or a background-image
you will be able to see them even if you have height equal to 0:
body {
background: red;
margin:0;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…