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

后端 未结 9 1168
一生所求
一生所求 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:24

    It's not possible to do it just like that, but you can overlay an opaque div between the div with the background-image and the text and fade that one out, hence giving the appearance that the background is fading in.

提交回复
热议问题