I completely agree CSS can do the job but IMHO, css's ways are even more `hacky`
i.e. use of single image and simply shift the background think abt it, this is accessibility evil! On 6月22日, 下午1時16分, "Ambient.Impact" <[EMAIL PROTECTED]> wrote: > I very much disagree with the following two points: > > On Jun 21, 10:51 pm, "howard chen" <[EMAIL PROTECTED]> wrote: > > > 2. Put rollover stuffs into CSS is no good: CSS for layout & design, > > JS for effect > > 1. CSS can't preload image, the plugin can > > 2. This is a subject that's certainly debatable, so I won't fault you > for opting to use JavaScript to handle this effect. However, I > personally think rollovers ARE part of the design. They certainly do > have a certain amount of "behaviour" to them, but CSS offers a simpler > and more lightweight way of achieving this effect, and it works if > JavaScript is unavailable. But that's simply my opinion. > > 1. This is the more important thing I wanted to comment on. While it > IS true that CSS rollovers are NOT preloaded if you swap out an image > on hover, you can get around this quite elegantly if you use a > different approach: use a single image and simply shift the background- > position. Two well-known pieces on the subject: > > http://www.alistapart.com/articles/sprites/http://www.wellstyled.com/css-nopreload-rollovers.html > > I hope anyone reading this makes an informed decision about choosing > how to tackle this problem. JavaScript isn't the only option.