我正在使用甜蜜警报插件,即使在转动设置选项动画后:假也是我正在获得甜蜜的警报开场动画(淡入淡出就像)即将来临。如何禁用it.sweet alertsweet alert
原始的甜蜜警报插件不受支持,我建议你使用SweetAlert2插件。
迁移很简单,这是迁移指南:Migration from SweetAlert to SweetAlert2
以下是SweetAlert2和禁用动画的示例:
Swal.fire({
title: 'SweetAlert2 modal without animation',
animation: false
})
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@8"></script>
这是我禁用动画的解决方案。
如果要删除缩放动画,请将其添加到主css文件中:
.swal-overlay--show-modal, .swal-modal {
animation: none !important;
}
如果要删除不透明度动画,请同时添加:
.swal-overlay{
transition: none !important;
}