开发者

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..

Reduce active area of a div/image to allow for shadow


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜