background-image doesn't appear if
is empty?

前端 未结 8 1079
旧巷少年郎
旧巷少年郎 2020-12-07 01:11

I created a

first thing in the to draw a top line at the top of the page:


    
8条回答
  •  隐瞒了意图╮
    2020-12-07 01:40

    As the answers above me suggest ^^' it's because it has virtually no size, you need either to put content inside to resize it or to set width/height or padding in css bordertop class, or you can put another empty inside it with set size. I was going to skip this answer since there are already answers but I just wanted to add that width/height is not your only option.

    On a side note, oh man, people here posting so fast I sometimes wonder if its a race and what is the prize, there must be some, I guess helping other is itself great prize. :) When I was starting to type this there was no answer yet.

提交回复
热议问题