Why doesn't the background image show up without specific width and height?

后端 未结 5 2015
星月不相逢
星月不相逢 2020-12-16 16:24

Here\'s an example code

I\'ve been wondering why the background-image doesn\'t show up unless I specific the image\'s width and height in pixels. I trie

5条回答
  •  心在旅途
    2020-12-16 16:56

    Div is container, it expects to have inner elements, when it's empty you must explicitly define height.

提交回复
热议问题