开发者

CSS: On-mouse-over functionality from plot covered by a 'sheen' layer

I have a javascript plot on my page with "data point highlighter" functionality: when the mouse hovers over the point, you can see the coordinates popup. I also want to place a semi-transparent "sheen" image layer over the plot to make it look glossy. I can achieve this with the z-index, but the on-mouse-over functionality of the js plot stops working. 开发者_StackOverflowIs there a way to have the sheen layer on top and still have the on-mouse-over of the layer below (the plot layer)? Many thanks...


I can't think of a way to do that easily, apart from splitting apart the plot image and the area that reacts to the mouseover, and placing the latter above the sheen - which may be bothersome to do.

If it's semi-transparent, though, would it be an option to do the whole thing the other way round? Placing the "sheen" below the plot, and making the plot semi-transparent?


This is not possible. Shame.


Actually, I believe it is possible, but it's a bit of a messy workaround, and, in essence, involves capturing mouse/cursor position x/y location and mapping that to the plot layer -- not the easiest or optimal task, let alone completely inefficient. I realize this is an older question, but thought I'd point this out for future users.

Update: Firefox has a CSS property geared toward this in the 3.6: http://demos.hacks.mozilla.org/openweb/pointer-events/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜