【发布时间】:2014-10-18 11:04:23
【问题描述】:
我知道这不是 toastr(或一般的 toast 通知)的用途,但我想将它们用作 modal notification。我的想法如下。
吐司表演:
toastr.options.onShown = function() { //Create an overlay on the entire page}
叠加层:
#overlay {
background-color: rgba(0, 0, 0, 0.8);
z-index: 999;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
display: none;
}
吐司关门:
toastr.options.onHidden = function() { //make overlay go away }
另外,我将 toast 的超时设置为 0,这样它就不会自行消失。
问题:我希望 toast 通知保持在叠加层之上,而不是在其后面,因为叠加层会覆盖所有内容。我该怎么做?
【问题讨论】:
标签: javascript jquery css jquery-ui toastr