문제

Id like to make a Toast like div in HTML, that appears for a few seconds and eases out again, using css ease out. The Problem is now, that it blocks clicking on stuff behind it while it is active and while it is invisible. So is there a way to et the user click on stuff behind it? I could just destroy it everytime it disapears, but then the ease effect is lost and the user still cant click on buttons while it is active. So how do I make it more Google Toast like?

도움이 되었습니까?

해결책

You can use pointer-events: none:

<div style="pointer-events: none">hi</div>

Fiddle: Fiddle Using Button

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top