Possible Duplicate:
Hit detection on non-transparent pixel
#welc is a transparent .png. Non-transparent pixels are placed diagonally, like a ribbon, so the majority of the image (top-left and bottom-right parts) are - transparent.
#welc:hover{
margin-top:-5px;
}
This works, but I want this effect only if mouse is over the "real image", i.e. over non-transparent pixels.
You could mask the opaque areas with an image map and only apply the hover when the cursor is over the mask. I don't know if that's a cross-browser safe solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With