[英]PrimeNG p-checkbox - Add asterisk mandatory sign after label
[英]how to put p-checkbox label from PrimeNG on the left of the checkbox
<p-checkbox name="group1" [value]="true" label="Outsourcing"
style="margin: 0 25px"></p-checkbox>
默認情況下,標簽位於復選框的右側,如何將其更改為左側?
您可以通過在p-checkbox
元素中將row-direction
樣式屬性設置為row-reverse
來實現這一點。
<p-checkbox
name="group1"
[value]="true"
label="Outsourcing"
style="margin: 0 25px; flex-direction: row-reverse">
</p-checkbox>
工作示例: https : //stackblitz.com/edit/angular-ivy-drzmxl?file=src/app/app.component.html
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.