fog effect on a web page

diamotsu

New Member
I'm designing a web page for a haunted house / hay ride. I'd like to find an effect that rolls fog over the page intermitantly. any ideas?
 

Absolution

New Member
My idea would be make a PNG with foggy clouds. Then use javascript to scroll it across the page (might need some trick to make sure the scroll bars dont show up). Also I would use javascript to make it fade in and fade out with the transparency CSS value.

Does anyone know if CSS formally supports a transparency option? I think before it was more of an IE thing.
 

PixelPusher

Super Moderator
Staff member
Yes the property opacity can be used, but will have no effect in IE. If you are going to use js to randomly time the clouds and assuming your are using jquery, just use the fadeIn(), fadeOut() functions. For a simple effect like clouds that would be perfect.
Alternatively, you could tie the fading effect into the animate() function. So it moves the cloud, then fades it out?
 
Top