Web Hosting, Design, & Coding

General discussion

HTML Image Rollover Code

by coldchowder / February 9, 2010 12:06 PM PST

What is the HTML script for a rollover image? For example: one image would be displayed, and then the user would move their cursor over the image and it would change to a different one. Also, if possible, is there a way to use different areas of an image as the trigger for a rollover effect?

Post a reply
Discussion is locked
You are posting a reply to: HTML Image Rollover Code
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: HTML Image Rollover Code
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
You can try this
by Sovereign Forum moderator / February 9, 2010 10:55 PM PST
Collapse -
Rollover images
by Urarto / February 15, 2010 11:20 PM PST

Rollover images are images that change when the mouse is over them. Rollover Images (or "rollovers" as we'll call them) are popular because they give the image a live feeling... they indicate that something will happen when you click on it.Using html tutorials I have found the code for a single rollover
<A
HREF="rollover_target.html"
onMouseOver = "rollover('home')"
onMouseOut = "rollout('home')"
><IMG
SRC="../graphics/home_out.gif"
NAME="home"
ALT="Home Page" BORDER=0
HEIGHT=130 WIDTH=115
></A>
<SCRIPT TYPE="text/javascript">
<!--
setrollover("../graphics/home_over.gif");
//-->
</SCRIPT>

Popular Forums
icon
Computer Help 47,885 discussions
icon
Computer Newbies 10,322 discussions
icon
iPhones, iPods, & iPads 3,188 discussions
icon
Security 30,333 discussions
icon
TVs & Home Theaters 20,177 discussions
icon
HDTV Picture Setting 1,932 discussions
icon
Phones 15,713 discussions
icon
Windows 7 6,210 discussions
icon
Networking & Wireless 14,510 discussions

Tech for the holiday

Find recipes for July 4 with these foodie apps

The Fourth of July means fireworks, fun and food. If you're planning on a barbecue this weekend, we've got the apps to help you find holiday-inspired recipes.