【发布时间】:2018-09-03 04:13:37
【问题描述】:
<script>
swal({
title: "Are you sure?",
text: "Once deleted, you will not be able to recover this imaginary file!",
icon: "warning",
buttons: true,
dangerMode: true,
})
.then((willDelete) => {
if (willDelete) {
swal("Poof! Your imaginary file has been deleted!", {
icon: "success",
});
} else {
swal("Your imaginary file is safe!");
}
});
</script>
如何在上面的代码中实现下面的方法。 我想将覆盖背景更改为不同的颜色。
.swal-overlay {
background-color: rgba(43, 165, 137, 0.45);
}
【问题讨论】:
标签: javascript jquery plugins sweetalert