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

后端 未结 5 1777
不思量自难忘°
不思量自难忘° 2020-12-16 16:15

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 17:09

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

提交回复
热议问题