취소 버튼의 색상을 확인 버튼처럼 변경할 수 있지만 어떤 이유로 작동하지 않는 것 같습니다.SweetAlert - 버튼 색상 변경
CODE 임) (https://jsfiddle.net/x20ra1o1/ 참조)
swal({ title: "Are you sure?", text: "You will not be able to recover this imaginary file!", type: "warning", showCancelButton: true, cancelButtonColor: "#DD6B55", confirmButtonColor: "#DD6B55", confirmButtonText: "Yes, delete it!", cancelButtonText: "No, cancel plx!", closeOnConfirm: false, closeOnCancel: false }, function(isConfirm){ if (isConfirm) { swal("Deleted!", "Your imaginary file has been deleted.", "success"); } else { swal("Cancelled", "Your imaginary file is safe :)", "error"); } });
는'cancelButtonColor'는 [이 API]에서 옵션을 선택하지 않습니다 (http://t4t5.github.io/sweetalert/) – chazsolo
나는 문서에서 해당 옵션이 표시되지 않습니다. 어쩌면 지원되지 않을 수도 있습니다. 언제든지 CSS로 자신 만의 클래스를 만들 수 있습니다. –
다음을 시도해보십시오 .... https://jsfiddle.net/x20ra1o1/2/ – Hackerman