因为u说过,内容会调整大小,所以按钮没有足够的空间,因此会转到下一行。
此问题的解决方案将使用“分配固定到”按钮,将剩余内容分组并使用
width:calc(100% - 30px);
用于重播内容。
请注意
width:calc(100% - 30px)
还应考虑任何边距,应用于按钮或内容。
.inner{
display:inline:block;
width:calc(100% - 30px); /*30px. should be same as button width */
}
.buuton{
width:30px;
}
<ion-row>
<div col-7 offset-5 no-padding text-right>
<div class="inner">
<ion-label *ngIf="!showInverted" no-margin class="rate label-tx">1 </ion-label>
<ion-label *ngIf="showInverted" no-margin class="rate label-tx">1 </ion-label>
</div>
<button (click)="showInvertedRate()" ion-button clear color="dark"> <ion-icon name="swap" class="rotate90"></ion-icon></button>
</div>
</ion-row>