我正在尝试为我的模态添加一个额外的类,以便我可以从 LESS 中选择它并将其背景变为透明。但是 customClass 不起作用。有没有其他方法可以做到。顺便说一句,我已经对默认类进行了很多更改,因此我只需要为一种模式执行此操作,无法影响全局 swal。
swal({
title: success,
showConfirmButton: false,
html: true,
customClass: ".swal-back"
});
Run Code Online (Sandbox Code Playgroud)