How do I remove background-image in css?

前端 未结 10 1785
孤街浪徒
孤街浪徒 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:29

    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #fff), color-stop(0.5, #fff));
    background-image: -webkit-linear-gradient(center top, #fff 0%, #fff 50%);
    background-image: -moz-linear-gradient(center top, #fff 0%, #fff 50%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ffffff', GradientType=0);
    background-image: linear-gradient(to bottom, #fff 0%, #fff 50%);
    

    for older browsers.. if you have defined css in some framewokrk.css like select2.css in IE9 background-image: -webkit-gradient etc. and you want it via another .css rewrite with "background-image: none !important" not works. I used same color to color gradient like page background color.

提交回复
热议问题