1

私は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;

でも変化が見られない

.sa-icon を削除すると。これを .tpl ページに追加します。

<img src="http://placehold.it/350x150" class="sweet-alert">

アラートは開きません。

アラートを開くには、次のコードを使用します。

<script type="text/javascript"> sweetAlert({ title: "ADULT CONTENT", text: "ARE YOU OVER 18?", imageUrl: "dist/image.png", showCancelButton: true, cancelButtonText: "No", confirmButtonColor: "#ff0000", confirmButtonText: "Yes, I'am Over 18", closeOnConfirm: true }, function(isConfirm){ if (isConfirm) { } else { window.location.href = 'http://'; } }); </script>

唯一の問題は、私の画像のサイズです。変更できません。提案?

4

1 に答える 1