在SweetAlert上更改图标图像大小 [英] Change icon image size on SweetAlert
本文介绍了在SweetAlert上更改图标图像大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在SweetAlert上更改图标图像大小。
在.css文件中,我看到:
I'm trying for change icon image size on SweetAlert. In the .css file I see:
.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文件以预定的大小显示。建议?
But not change nothing. My .png file is showed in a predefinite size. Suggestions?
推荐答案
使用控制器中的imageSize对象类。
use the "imageSize" object class in your controller.
swal({ title: "Oops...",
text: "Please have a title and body in your post.",
imageUrl: "../../../img/oopsface.png",
imageSize: '600x600'
});
(如果你想以这种方式修改你的甜蜜警报,你需要使用这种格式来调用警报)
(if you want to modify your sweet alert in this way, you need to use this formatting to call the alert)
这篇关于在SweetAlert上更改图标图像大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文