我正在尝试更改 SweetAlert 上的图标图像大小。 在 .css 文件中,我看到:
.sweet-alert .sa-icon {
width: 80px;
height: 80px;
border: 4px solid gray;
-webkit-border-radius: 40px;
border-radius: 40px;
border-radius: 50%;
margin: 20px auto;
padding: 0;
position: relative;
box-sizing: content-box; }
我已经改变了这个值:
width: 80px;
height: 80px;
但并没有什么改变。我的 .png 文件以预定大小显示。有什么建议吗?
最佳答案
在您的 Controller 中使用“imageSize”对象类。
swal({ title: "Oops...",
text: "Please have a title and body in your post.",
imageUrl: "../../../img/oopsface.png",
imageSize: '600x600'
});
(如果你想这样修改你的sweet alert,你需要使用这个格式化来调用alert)
关于css - 在 SweetAlert 上更改图标图像大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32238017/