|
Image Rollovers w/ CSSI've seen many tutorials for navigations using images and Javascript, all sorts of bulky code and needless code, well here's one I found that really simplifies things and explains it short and sweet. Image rollovers using CSS only. No Javascript, no bloated, bulky code. http://www.tutorio.com/tutorial/pure-css-image-rollovers <div class="rollover"> <a href="#">Item 1</a> <a href="#">Item 2</a> <a href="#">Item 3</a> <a href="#">Tutorio</a> </div> CSS .rollover a {
display:block;
width: 90px;
padding:10px 10px 10px 7px;
font: bold 13px sans-serif;;
color:#333;
background: url("rollover-image.gif") 0 0 no-repeat;
text-decoration: none;
}
.rollover a:hover {
background-position: 0 -35px;
color: #049;
}
.rollover a:active {
background-position: 0 -70px;
color:#fff;
}Creating the image "The beatings will continue until morale improves." -- The Management |
Offline |