【发布时间】:2018-07-10 10:36:58
【问题描述】:
我似乎无法让芯片上的关闭 x 出现并坚持 .css。
这是 HTML:
<ion-card>
<ion-card-content>
<ion-label>City</ion-label>
<input placeholder="Enter city" #searchPlaces>
<div class="selected-places">
<ion-chip *ngFor="let intPlace of intPlaces">
<ion-label>{{ intPlace }}</ion-label>
<button (click)="deletePlace(intPlace)">
<img src="assets/img/ic-small-close.png"/>
</button>
</ion-chip>
</div>
</ion-card-content>
</ion-card>
还有css
.selected-places {
ion-label{
width: 79.4px;
font-family: Gotham;
font-size: 14.2px;
font-weight: normal;
font-style: normal;
font-stretch: normal;
line-height: normal;
letter-spacing: normal;
text-align: left;
color: black !important;
overflow-y: visible !important;
}
ion-chip{
display: inline-block;
padding: 0 25px;
padding-bottom: 25px;
height: 30px;
font-size: 12px;
line-height: 20px;
border-radius: 25px;
background-color: #f1f1f1;
margin: 3px;
img{
width: 3px !important;
height: 3px !important;
float: right !important;
}
}
由于某种原因,我无法在芯片上显示 x。我试过玩css,但它不会出现在芯片上。
“L”下的灰色竖条应该是“x”图像。
【问题讨论】:
-
我认为你在 css 部分错过了一个结束
}.. 可能只是问题中的一个错字 -
是的,这是问题中的错字。右括号在 css 中。
标签: html css angular ionic-framework