Pass click events through a DOM layer

后端 未结 4 1955
轻奢々
轻奢々 2021-01-14 09:03

I have a div that is positioned to the bottom of the page and sits above everything on the page. I include a shadow to remove the harsh cutoff of the content below. However,

4条回答
  •  迷失自我
    2021-01-14 09:24

    If browser support is not a probleme fore you, you can use the CSS properties pointer-events

    .bottom-wrap {
        pointer-events:none;
    }
    

    But to make the content inside active, you need to reset it like that :

    .bottom-wrap .bottom {
        pointer-events:auto;
    }
    

    Fiddle : http://jsfiddle.net/aY2Ld/5/

提交回复
热议问题