【发布时间】:2020-10-31 03:39:44
【问题描述】:
这个 UI 是由以下代码生成的 ....表示 checkboxes 没有正确对齐。它们显示在极左和极右。
<div class="sample">
<div align="left" class="user-modified-rule">
<mat-checkbox (change)="changeSelectionTo()" [(ngModel)]="isChangeRule"></mat-checkbox>
<rule> </rule>
</div>
<div class="ruleSpearator"> OR</div>
<div align="right" class="production-stage-rule">
<mat-checkbox (change)="changeSelectionTo()" [(ngModel)]="isOriginalRule"></mat-checkbox>
<rule> </rule>
</div>
</div>
我想要如下图所示的UI
我需要将复选框与<rule> 对齐,如代码所示
如果我更改代码
<mat-checkbox></mat-checkbox>
<rule></rule>
到
<mat-checkbox>
<rule></rule>
</mat-checkbox>```
then entire rule becomes clickable..means any where click on rule , does the checkbox check and uncheck , which i do not want to
【问题讨论】:
-
使用 Css Flexbox
-
你能提供代码吗?
标签: html css angular checkbox layout