a { display: block; width: 300px; height: 100px; position: relative } a span { position: absolute; top: 0; left: 0; width: 300px; height: 100px; background: url('witaj.png') no-repeat; } a:hover span { background: url('witaj-on.png') no-repeat; }
Listing 34.2. Rozwiązanie ćwiczenia 34.2
Rozdział 34. Przyciski rollover w CSS