Javascript free rollovers
10th September 2003
I’ve talked about image rollovers on this site before, but I’ve never seen a technique I like half as much as Pixy’s Fast rollovers, no preload needed. Like all good techniques, it’s so simple I’m surprised no one has thought of it before. The trick is that a single image is loaded containing the different rollover states, then positioned as the background of a fixed pixel size link element in such a way that only one of the states is shown. The :hover style simply changes the offset of the background, revealing the secondary (or even tertiary) state.
More recent articles
- I really don't like ChatGPT's new memory dossier - 21st May 2025
- Building software on top of Large Language Models - 15th May 2025
- Trying out llama.cpp's new vision support - 10th May 2025