// HTML header
// HTML body
title="A little button!"
class="btnBase btnDerived idle"
onclick="document.location.href='.'; return false;"
background: url(idle.gif) center center;
background: url(over.gif) center center;
background: url(click.gif) center center;
Of course, this does not work in IE if you have more than one different button because of a CSS parsing bug. It just uses the last multiple selector definition...
Another flaw is that it doesn't preload images which causes flickering. This can be solved with sprites. If someone knows of a better way, let me know.