[英]Remove spacing in ion-list
I try to remove the spacing between the items.我尝试删除项目之间的间距。 as you can see the list takes up a log of space vertically and i need the text closer together but I want to keep the lines.如您所见,该列表在垂直方向上占据了一个日志空间,我需要将文本靠得更近,但我想保留线条。
I tried a ton of different css stuff (setting margins/paddings to 0 and reduce max-height)but it always cuts off the line and the text instead of just removing the space between.我尝试了很多不同的 css 东西(将边距/填充设置为 0 并减少最大高度)但它总是切断线和文本而不是仅仅删除它们之间的空间。
<ion-card>
<ion-card-header>
<ion-card-subtitle>
Tichumaster
</ion-card-subtitle>
<ion-card-title>
<ion-icon class="iconSize" name="aperture"></ion-icon>
</ion-card-title>
<ion-card-content>
<ion-list>
<ion-item>
<ion-label>Du</ion-label>
<ion-note slot="end" color="tertiary">10%</ion-note>
</ion-item>
<ion-item>
<ion-label>Du</ion-label>
<ion-note slot="end" color="tertiary">10%</ion-note>
</ion-item>
<ion-item>
<ion-label>Du</ion-label>
<ion-note slot="end" color="tertiary">10%</ion-note>
</ion-item>
<ion-item>
<ion-label>Du</ion-label>
<ion-note slot="end" color="tertiary">10%</ion-note>
</ion-item>
</ion-list>
</ion-card-content>
</ion-card-header>
</ion-card>
I had a hard time also doing that.我也很难做到这一点。 But I managed to achieve doing但我设法做到了
ion-item.myList{
margin-top: -11px;
}
But to not interfere on all ion-item I was using, I used a class但是为了不干扰我使用的所有离子项目,我使用了 class
<ion-item class="myList">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.