Smooth Image Buttons

Eric Simmons Apr 2, 2007

General

With this script your buttons can have up to four states: none, over, down, and up. This makes the button feel more real than a simple mouseover. In addition, the different button states are all part of the same background image.


Four different colors of test buttons.?

Did you say toolbar?

Notes

  • The div width properties must be set inline (within the div tag not the CSS file).
  • The button div elements must have both name and ID = "jsimgbutton".

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: ImgButtons.js


Head

Paste this code into the HEAD section of your HTML document.


Body

Paste this code into the BODY section of your HTML document


Other

Download the images using the URL below:

Leave a Response

(0 comments)