How do I remove background-image in css?

前端 未结 10 1793
孤街浪徒
孤街浪徒 2020-12-01 01:39

I have a general rule which gives all DIVs a background image.
I have one div (with id=\'a\') which I don\'t want it to have the background image.
What css rule do I

10条回答
  •  悲哀的现实
    2020-12-01 02:33

    div#a {
      background-image: url('../images/spacer.png');
      background-image: none !important;
    }
    

    I use a transparent spacer image in addition to the rule to remove the background image because IE6 seems to ignore the background-image: none even though it is marked !important.

提交回复
热议问题