3
"height"プロパティはありませんが、 "width"プロパティがあることに気付きました。ダイアログの高さを80%に設定する方法はありますか?SweetAlert2:sweetAlert2のダイアログの高さを設定する
おかげ
https://limonte.github.io/sweetalert2/
"height"プロパティはありませんが、 "width"プロパティがあることに気付きました。ダイアログの高さを80%に設定する方法はありますか?SweetAlert2:sweetAlert2のダイアログの高さを設定する
おかげ
https://limonte.github.io/sweetalert2/
あなたは以下のスニペットのようにカスタムCSSクラスを使用する必要があります。
const test =() => {
swal({
title: 'Test',
customClass: 'swal-height'
});
};
.swal-height {
height: 80vh;
}
<script src="https://unpkg.com/[email protected]/dist/sweetalert2.all.js"></script>
<button onclick="test()">test</button>