Make overlapping div “not clickable” so that content below can be accessed?

后端 未结 4 682
囚心锁ツ
囚心锁ツ 2020-12-24 06:04

I am using a JPG overlay with a reduced opacity for an effect, however I want it as an effect only and make the content below that div clickable. Is that possible, thanks :)

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-24 06:26

    one simple trick i have found, althoug not very w3c, is to encapsulate the div into a span and use that span class to make the overlay. That way the whole thing will be clickable , and the div will behave like a div

提交回复
热议问题