JAVASCRIPT ROLLOVER BUTTONS

Posted by Unknown 0 komentar
Download free JavaScript Rollover Buttons pdf. You see rollover buttons all over the web, mostly on navigation bars. When the mouse is over a button on the navigation bar, it appears depressed; when the mouse moves on, it appears just as it did before. Rollovers can also be used simply to change one picture for another when the mouse hovers over it.

The first thing you’re going to need to do is create two sets of buttons, using Photoshop or some other type of graphics program—one set that appears when the mouse is over the buttons and one set to appear when the mouse is off the buttons. When the mouse moves onto a button image, which by default is off, our code will swap the off button image for the on button image, and likewise, when the mouse moves off of the on button image, our code will swap it for the off button image. It’s a good idea to be consistent with your naming of the buttons so that you can easily keep track of them. For example, the on buttons could be named “home_on.gif”, “about_on.gif” and so on, while the off buttons could be named “home_off.gif”, “about_off.gif” and so on. To make the on buttons seem as if they are depressed in comparison to the off buttons, you just need to move the image or lettering on them down and to the right by a couple pixels.

here

0 komentar:

Post a Comment