CSS3 Element with Opacity:0 (invisible) responds to mouse events

后端 未结 3 794
执念已碎
执念已碎 2021-02-19 03:33

CSS3 using Webkit in Safari; I have a button that, when clicked, causes a div to fade in. That div is just a big filled rectangle and it has a few buttons in it, one of whichcau

3条回答
  •  不知归路
    2021-02-19 04:32

    If you're setting your div to have an opacity of zero, you're still going to be able to interact with the "invisible" item. You want to set it to display:none instead. You could do both, allowing the div to fade out to zero and then tack on the display:none when the animation has finished.

提交回复
热议问题