Empty div (with style: height) will not display

前端 未结 7 1192
独厮守ぢ
独厮守ぢ 2020-12-29 21:06

Incredibly simple piece of HTML - but not displaying how I would expect.

I\'m trying to create an empty div that displays as whitespace on the top of the p

7条回答
  •  庸人自扰
    2020-12-29 21:11

    The reason it did not display is because you had position:absolute in your style. That means that div will be positioned independently of the other elements, and have no effect on the div that follows. So your second div is essentially the first div on the screen.

提交回复
热议问题