How to make an element transparent to clicks but still visible?

后端 未结 1 1061
囚心锁ツ
囚心锁ツ 2021-02-19 04:08

I\'m interested in putting an inset box shadow on something like an iframe. While the strategy of overlaying a div over the iframe gives the expected visual display, the div sub

1条回答
  •  情话喂你
    2021-02-19 04:28

    Yes, there's pointer-events: none.

    See: http://jsfiddle.net/YqXPg/3/

    A version that makes the overlay more obvious: http://jsfiddle.net/YqXPg/4/

    Note that this property doesn't work with IE, but if I remember correctly, IE will allow you to click through the transparent parts of the overlay div anyway.

    0 讨论(0)
提交回复
热议问题