In this chapter you have learned how to create several different types of animation and add them to your Web pages. Should you? When you decide to use animation in a Web page, you tread the very thin line between making your site attractive and making it gaudy.
|
|
A
splash page
is an introductory page that functions somewhat like a book cover. It tends to be artistic in nature and then gives way to the site's main or index page. Many splash pages use sophisticated animation to act as a welcome mat to the Web site. However, because nearly 50 percent of Internet access is still done through slow, dialup modems, you might want to think twice before making your
|
|
There are certain givens about human beings. One of them is that people tend to be irritated by things that repeat endlessly. Think of that dripping faucet in the kitchen or the too-loud ticking of the clock on your wall. How about a neon light right outside your bedroom window, blinking on and off all night? What about your neighbor’s dog, which has been barking incessantly since two in the morning? Do you get the idea?
There is nothing more
That’s
Limit your use of animation. The purpose of animation is to
Don’t allow animations to loop endlessly. When you create them, set them to run about four, maybe five, times. That should be enough to draw a Web surfer’s attention.
If you create Flash animations, make sure that they are not so large that your visitors have to wait a long time for them to download.
If you want to use <marquee>, use it with the slide value. That will allow your text to slide onto the page, making a nice
Please,
Animation is tricky to use but, if done tastefully, can enhance your site. Animated GIFs are the simplest and most common forms of animation on the Web. However, you can also add animation through Java applets and Flash animation. HTML animations such as <marquee> and <blink> are discouraged because they are presentational elements. In the transitional world of XHTML 1.0, they are discouraged; in the strict world of XHTML 1.1 and even stricter world of XHTML 2.0, they are not permitted. The following table lists some of the basic code you will need to add animations to your Web pages:
|
To Do This |
Use This |
|---|---|
|
Add an animated GIF |
<img src="animation.gif" /> |
|
Add a Java applet with <object> |
<object classid="java:applet.class" |
|
Add a Java applet with <applet> (deprecated) |
<applet code="applet.class" width="##" height="##"> </applet> |
|
Add parameters to an applet |
<param name=" |
|
Add a scrolling marquee (discouraged) |
<marquee>Text</marquee> |
|
Control a marquee’s behavior |
<marquee behavior="value">
|
|
Control a marquee’s direction |
<marquee direction="value">
|
|
Control a marquee’s speed in pixels |
<marquee scrollamount="value">
|
|
Control a marquee’s speed in
|
<marquee scrolldelay="value">
|
|
Create blinking text with <blink> (discouraged) |
<blink>Blinking Text</blink> |
|
Create blinking text with CSS |
selector {text-decoration: blink}
|