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; }
I have changed this values:
width: 80px;
height: 80px;
But not change nothing. My .png file is showed in a predefinite size. Suggestions?
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)
'imageHeight' for image height and 'imageWidth' for image width
swal({
title: 'Alert!',
text: 'Content',
imageUrl: 'assets/images/user.png',
imageHeight: 80,
imageWidth: 80,
imageClass:'img-responsive rounded-circle',
animation: false
});
HTML Output like
<img src="assets/images/user.png" class="img-responsive rounded-circle" height="80" width="80" >
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With