[英]How can you add a class for the title?
function showPromptMessage() {
swal({
title: "Describe your edit",
type: "input",
showCancelButton: true,
closeOnConfirm: false,
animation: "slide-from-top",
inputPlaceholder: "Write something"
}, function (inputValue) {
if (inputValue === false) return false;
if (inputValue === "") {
swal.showInputError("You need to write something!"); return false
}
swal("Saved successfully");
});
}
Add to your css: 添加到您的CSS:
h2.swal2-title{
color: blue;
/*Whatever you need*/
}
For more information visit: https://limonte.github.io/sweetalert2/ 有关更多信息,请访问: https : //limonte.github.io/sweetalert2/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.