There are a number of ways you can incorporate images into your web site. If you're adding them to make your web site more dynamic, you probably want to venture beyond images that just sit there all the time. In this article, you'll learn how to make your pictures do something, with a little help from CSS, JavaScript, and HTML.
Changing and Moving Pictures with CSS - Moving Pictures Demonstration (Page 2 of 4 )
In this example a ball keeps moving through an arc. Copy the following code in to a text editor and save the result as an HTML file in a directory. The pictures for this demonstration are attached: they are called, ball1.gif, ball2.gif, ball3.gif, ball4.gif, ball5.gif, ball6.gif, ball7.gif, ball8.gif, ball9.gif. You can find the images in the last section of this article.
The images are in order and each one shows the ball in a slightly different position from the previous one. Download and save the pictures in the same directory as the file above. Open the file with a browser and you should see the ball moving through an arc repeatedly.
<html>
<head>
<style type="text/css">
body {position:relative; z-index:0; background-color:maroon; color:white}