Is necessary to show an empty
?

后端 未结 7 1716
天涯浪人
天涯浪人 2021-01-17 10:25

I\'d like to show a div that has a background-color with the height and width set to 100% but no content. Is it possible to do that without putting a   inside?

7条回答
  •  被撕碎了的回忆
    2021-01-17 11:04

    I think it depends on the browser (IE/Gecko engine/Webkit engine) and on the mode (Standards mode, Quirks mode). I had some divs appearing in FFox/Standards mode and not appearing in IE6/7.

    You probably can do it in a cross browser way with only css, but you'll probably resort to some css hacks.

提交回复
热议问题