css - 在 SweetAlert 上更改图标图像大小

标签 css image icons size alert

我正在尝试更改 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/

相关文章:

css - 使用跨度类是好习惯吗?

html - 溢出自动不起作用

c - 从 Linux 控制台显示图像

安卓图标 : avoiding white margins

android - 从 packageManager 检索 xhdpi 应用程序图标?

javascript - 如何在悬停空 div 时更改不同的 div 背景图像?

php - 将 css li 添加到 php?

vb.net - 如何在VB.NET中的图像上创建鼠标悬停工具提示?

css - 如何使图像在图形内居中?

google-maps-api-3 - Google Maps Api v3,自定义“群集”图标