Reduce active area of a div/image to allow for shadow
Some 'buttons' (divs with background images) on my webpage have shadow effects in the image. I don't want the shadow area to cause a click event. Is there any relatively simple way to reduce the active area of a div using css? Or are there any standard techniques for doing this开发者_如何学Go?
I have a click effect when the button is pressed (using :active
) which I'd like to keep..
Add another div inside with proper size and margins that handles the click instead.
You also make have some luck with using negative margins, but cross browser support for that is poor.
精彩评论