Changing background

J

jpmaster

Hi there,

I need to create an effect to change the background color
of a page, like a flashing effect. It has to be
constantly switching between colors (two). It has to work
on page load. Any ideas or suggestions? Thank you.

jpmaster
 
J

jon spivey

Hi,
this doesn't sound like a nice effect :)

If you really want to you could something like this
<script type="text/javascript">
function swapBg(){
document.bgColor=(document.bgColor=='#ff0000')?'#00ff00':'#ff0000';}
function startTimer(){
setInterval('swapBg()',2000)}
onload=startTimer;
</script>
<body bgcolor="#ff0000">

This will swap between green and red every 2 seconds - modify to suit
 
C

Chuck

any animation program you can for instance.
1. Start off with white.
2. Then change it to black.
3. Then loop it so it is continuous.
I actually done this before in LiveMotion. The cool thing to add is make
your letters switch also. white on black and black on white.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top