我正在使用sweetalert作出声明决定的选择。在文本部分中,我使用的是具有无线电类型的输入类。 我可以将复选框与左侧的文本对齐吗?可能这是div'p'。
我尝试了很多选项,但它仍然不起作用:(
你能帮助我吗?
table = new PdfPTable(2);
// Makes the table to get the 100 percent of space that is available horizontally
table.setWidthPercentage(100);
// Creates a paragraph indentated by the left by 20 units.
p = new Paragraph();
// You insert the table into the indentated paragraph.
p.add(table);
p.setIndentationLeft(20);
// And finally, this will show a table indentated to the left by 20 units.
document.add(p);
答案 0 :(得分:0)
您可以使用SweetAlert2 - 原始SweetAlert支持的分支:
swal({
title: 'Select color',
input: 'radio',
inputOptions: {
'#ff0000': 'Red',
'#00ff00': 'Green',
'#0000ff': 'Blue'
}
})
.swal2-radio {
flex-direction: column;
align-items: flex-start !important;
}
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@7"></script>
PS。请注意,SweetAlert2与SweetAlert略有不同,请查看简单的迁移指南:https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2