简体   繁体   English

在离子列表的离子项目的第一行剪切了单词

[英]Words are cut in first line of ion-item in ion-list

Io ionic 3, I am using an ion-list, inside it I have an ion-item, but first line inside each ion-item is cut. 离子3,我使用的是离子清单,里面有一个离子项目,但是每个离子项目内部的第一行都被剪掉了。 As you can see, the capital 'A' letter is not entirely visibile. 如您所见,大写字母“ A”并不完全可见。 Can you help me? 你能帮助我吗? Thanks 谢谢

This is my code and my screenshot 这是我的代码和屏幕截图

<ion-list>
 <li *ngFor="let risultato of risultatiFiltered">
  <ion-item text-wrap>
   <h3> Activity: {{risultato.activity}} </h3>          
   <h3> Time: {{risultato.time}} </h3>
   <h3> Score: {{risultato.score}} </h3>
  </ion-item>
 </li>
</ion-list>

截图

This issue appears to affect all of the <ion-item /> elements and not just the first (and / or last) one(s), I would start by trying to change the font-size or overflow of the <ion-item /> tag. 这个问题似乎会影响所有<ion-item />元素,而不仅仅是第一个(和/或最后一个),我将从尝试更改<ion-item />font-sizeoverflow <ion-item />标签。

For example, you could use the overflow-y property to remove the top / bottom "cropping" (sorry, I have no better word to describe it): 例如,您可以使用overflow-y属性删除顶部/底部的“裁剪” (对不起,我没有更好的词来形容它):

ion-item {
  overflow-y: visible
}

You could also try to make the font-size smaller, for example, if your current font-size is 16px , you could try to set it to: 您还可以尝试减小font-size ,例如,如果当前的font-size16px ,则可以尝试将其设置为:

ion-item {
  font-size: 14px
}

Although you should tweak it to see what works best. 尽管您应该对其进行调整,以了解最有效的方法。

UPDATE: are you using box-sizing ? 更新:您正在使用box-sizing吗? Because if you aren't you should check the padding as it might be affect the <ion-item /> element's size, causing it to hide it's overflow. 因为如果不是这样,则应检查填充,因为它可能会影响<ion-item />元素的大小,从而导致其隐藏它的溢出。

If that's the case then removing it using: 如果是这种情况,请使用以下命令将其删除:

ion-item {
  overflow-y: visible
}

Should work. 应该管用。 You could also remove the overflow in it's entirety using: 您还可以使用以下命令完全消除溢出:

ion-item {
  overflow: visible
}

Good luck. 祝好运。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM