Can I fade in a background image (CSS: background-image) with jQuery?

后端 未结 9 1152
一生所求
一生所求 2020-11-29 00:52

I have a div element with text in it and a background image, which is set via the CSS property background-image. Is it possible to fade in the back

9条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-29 01:26

    You can give opacity value as

    div {opacity: 0.4;}
    

    For IE, you can specify as

    div { filter:alpha(opacity=10));}
    

    Lower the value - Higher the transparency.

提交回复
热议问题