javascript - Animating Background Image -


I like jquery and its companion using jquery ui, but background image to animate in a certain period of time There is no way to get 5 seconds. I can not do anything like this:

  $ ('sampling'). Animate ({'background-image': 'url (hello.jpg)'}, 5000);  

Any ideas ??

This is not possible like this. CSS does not allow the background image to be manipulated in this way. You should put the background behind your content in a div and fade in it:

  & lt; Div id = 'background_img' style = 'display: none; Status: Absolute; '& Gt; & Lt ;! - Position me behind the material! - & gt; & Lt; Img ... /> & Lt; / Div & gt; & Lt; Div id = 'content' & gt; YDADA & lt; / Div & gt; $ ('# Background_img') fadein (5000)  

Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -