也许有一个非常简单的解决办法,但我不知道如何用语言来表达。当屏幕缩小时,我试图让一个减号按钮进入一个元素下,但它只是遵循自然顺序。
当屏幕变小的时候。
例如,当屏幕大小在移动设备上时,有没有办法在底部设置减号按钮?
<div class="form-group">
<label class="col-form-label col-form-label-lg">Boarded</label>
<div class="form-row">
<div class="col-sm-5">
<button type="button" class="btn btn-dark btn-number btn-lg btn-block"
(click)="decreaseBoardedValueClicked()">-</button>
</div>
<div class="col-sm-2">
<input type="number" pattern="[0-9]*" inputmode="numeric"
class="form-control form-control-lg input-group-text" name="boarded" min="0"
[(ngModel)]="log.boarded" #logBoarded="ngModel" required>
</div>
<div class="col-sm-5">
<button type="button" class="btn btn-success btn-number btn-lg btn-block"
(click)="increaseBoardedValueClicked()">+</button>
</div>
</div>
<div class="alert alert-warning" *ngIf="logBoarded.errors?.required && logBoarded.touched">
The number of passengers boarded is required.
</div>
<div class="alert alert-warning" *ngIf="logBoarded.errors?.pattern && logBoarded.touched">
Invalid input. It can only contain counting numbers.
</div>
</div>