creating an image only visible on hover

I’d like to have an image that is only visible on hover. I thought this might be possible to do by creating a style with a normal opacity of 0 and then changing the opacity to 100 in the hover style. Although that works for a control such as a webcontainer, it doesn’t work for an image, as far as I can tell. The opacity of the image will be set to 0 (or whatever else) in the normal style, but hovering over the image does not change the opacity. So, I’m wondering if I’m doing something wrong, or if there is another way to make an image visible only on hover.