CSS Rollovers
If you're new here, you may want to subscribe to my RSS feed.
Javascript is a great scripting language used for creating websites. One of the more popular uses of JavaScript is the use of rollovers. There is a draw back with JavaScript rollovers, you have to use images to create the effect. This means that you have to preload the images, which to people who have a slower connection this means the page takes longer to load. With CSS, you can use the :hover pseudo-class to get a similar effect. Here is an some example code that would create a rollover.
a {
color: #FFFFFF;
background-color: #94CB2E;
}
a:hover{
color: #94CB2E;
background-color: #FFFFFF
}
Posted on May 27th, 2008 by Derald under Layouts


No Comments