[英]Bottom right border on ion-item
I have a ion-item described as:我有一个离子项目描述为:
<ion-row>
<ion-item class = "Checkbox">
<ion-label>Remember my choice</ion-label>
<ion-checkbox [(ngModel)]="remember"></ion-checkbox>
</ion-item>
</ion-row>
where the Checkbox class is described as:其中 Checkbox 类被描述为:
.Checkbox {
color: white;
background:#c34545;
}
The problem is that this gives my ion-item a weird bottom right border which you can check out:问题是这给了我的 ion-item 一个奇怪的右下边框,你可以查看:
I found the border property on the button class as:我发现按钮类的边框属性为:
button {
border: 0;
border-top-color: initial;
border-top-style: initial;
border-top-width: 0px;
border-right-color: initial;
border-right-style: initial;
border-right-width: 0px;
border-bottom-color: initial;
border-bottom-style: initial;
border-bottom-width: 0px;
border-left-color: initial;
border-left-style: initial;
border-left-width: 0px;
border-image-source: initial;
border-image-slice: initial;
border-image-width: initial;
border-image-outset: initial;
border-image-repeat: initial;
But disabling it gives me this:但是禁用它给了我这个:
This is really making me pull my hair out.这真的让我把头发拉出来。 The only other possible conflict in the scss file is the ion-row that I have defined:
scss 文件中唯一可能发生的冲突是我定义的 ion-row:
ion-row {
align-items: center;
text-align: center;
}
The best way to remove the bottom line is to add no-lines
property to ion-item
.删除底线的最佳方法是向
ion-item
添加no-lines
属性。 No need to add any css
styles.无需添加任何
css
样式。
向 ion-item 标签传递一个名为 lines 且值为 none 的参数。
<ion-item lines="none">
Found the answer, thanks to Mr.Bellians' comment.找到了答案,感谢 Bellians 先生的评论。 I went and took another look.
我去又看了一眼。
.item-md.item-block .item-inner {
padding-right: 8px;
border-bottom: 1px solid #dedede;
}
As you can see it has a border-bottom.正如你所看到的,它有一个边框底部。 I overrided it in my scss file and it looks fine now.
我在我的 scss 文件中覆盖了它,现在看起来很好。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.