开发者

Fading in background image with jQuery

开发者 https://www.devze.com 2022-12-10 14:28 出处:网络
How would you fade in a background image (the body tag, and it is tiled) with jQuery? The backg开发者_StackOverflow社区round color is white and in a callback function I want to toggle the background i

How would you fade in a background image (the body tag, and it is tiled) with jQuery? The backg开发者_StackOverflow社区round color is white and in a callback function I want to toggle the background image to on and off.

Any ideas?


Using jQuery for Background Image Animations


Unfortunately you can't really fade in a tiled background image. Since the image is part of the CSS rendering system it doesn't have a node in the DOM.

You can do some fancy stuff by using a frame type animation by moving the position of the background image but this wouldn't work with:

A. a whole body background
B. a tiled image.
0

精彩评论

暂无评论...
验证码 换一张
取 消