How to pass click events from one div to another?

前端 未结 3 729
攒了一身酷
攒了一身酷 2021-01-05 09:43

I need to find a way to pass click events from a div on top to the div below it (and ignore the clicks on the higher div). There is a known way of simulating the cli

3条回答
  •  北荒
    北荒 (楼主)
    2021-01-05 10:06

    add this css property to the overlay div:

       pointer-events: none;
    

    You can read more about it at: http://robertnyman.com/2010/03/22/css-pointer-events-to-allow-clicks-on-underlying-elements/

提交回复
热议问题