【发布时间】:2021-03-29 16:29:33
【问题描述】:
我有一个我正在为自己制作的应用程序,我有两个 's 和一个在中间。 在按钮末尾自动生成换行符,使 UI 看起来像这样: image
我尝试向按钮添加一个 css 标记并在 css 中使用 display: inline,但这只会使按钮变宽。
这是该部件的当前 HTML:
<ion-col size="auto">
<ion-fab-button class="pmButton" (click)="pmOne('-', info.key, info.value.count)" color="danger" >-</ion-fab-button>
<span class="ion-margin info">{{info.value.count}} {{itemUnits}}</span>
<ion-fab-button class="pmButton" (click)="pmOne('+', info.key, info.value.count)" color="success" >+</ion-fab-button>
</ion-col>
和 CSS:
.pmButton {
width: 20px;
height: 20px;
vertical-align: middle;
text-align: center;
}
.info {
display: inline;
vertical-align: middle;
text-align: center;
}
谢谢
【问题讨论】:
标签: html css ionic-framework sass