使 toast 允许像 Skype 通知一样在悬停时单击后面的元素

Make toast allow to click the elements behind on hover like skype notification

我在 angular 基础 UI 中使用 ngx-toastr 创建了 toast。 当用户将鼠标悬停在 toast 上时,我想要类似 Skype 通知的东西,它应该允许点击它后面隐藏在它下面的元素。

当 toast 出现在那个位置的右上角时,我有一个按钮可以做某事,toast 恰好出现在它上面,使用户无法访问按钮,直到它消失 是否有一些功能,当用户将鼠标悬停在吐司上时,它变得不那么不透明并且应该允许用户通过它单击按钮

只是为了确保我答对了问题,您希望能够看穿 ngx toast 并单击底层元素,对吗?

您可以将其添加到应用的 CSS 文件(全局或组件级别 css)

::ng-deep #toast-container > div {
    opacity: 0.8 !important;
    pointer-events: none !important;
}