我有一个列出产品类别的页面。此页面列出了类别视觉效果和类别名称。但类别图像和类别名称不垂直对齐。我想为每个屏幕尺寸垂直对齐这两个对象。谢谢。 My categories page picture 代码:
<ion-item [hidden]="!anaListeGoster" *ngFor="let list of anaKategoriListesi" (tap)="kodYakala(list.OZELKOD, list.ACIKLAMA, list.ID)">
<div class="resimKutusu">
<img class="kategoriResimleri" [src]="'xx.com.xx.com'+list.OZELKOD+'.jpg'">
</div>
<span class="aciklamaYazisi"> {{ aciklamaKisalt(list.ACIKLAMA) }} </span>
<ion-icon class="devamEtIcon" name="ios-arrow-forward" item-end></ion-icon>
</ion-item>
&#13;
.resimKutusu{
float: left;
width:50px;
height: 50px;
text-align: center !important;
border-radius: 50%;
overflow: hidden;
}
.kategoriResimleri{
min-width: 50px;
max-width: none;
height: 50px;
}
.aciklamaYazisi{
font-size:16px;
position: absolute;
margin-top : 5%;
margin-left: 3%;
}
&#13;
答案 0 :(得分:0)
.resimKutusu {
display: content;
float: left;
width:50px;
height: 50px;
text-align: center !important;
border-radius: 50%;
overflow: hidden;
}