how to remove ionic 4 segment indicator (bottom line)? please let me know

我是研究僧i 提交于 2021-01-27 14:33:30

问题


  .segment-button-indicator {
        -ms-flex-item-align: end;
        align-self: flex-end;
        width: 100%;
        height: 2px;
        background-color: var(--indicator-color);
        opacity: 1;
    }

I am new to hybrid app development. I have to use ion-segment. There is ion-segment-indicator which indicates bottom line in ion-segment, so I need to remove it. I can remove from these default css codes, but when I try to customize it's not removing


回答1:


You cannot remove it, but you can hide it by setting it's color to transparent.

On theme/variables.scss add this:

ion-segment-button {
  --indicator-color: transparent !important;
  --indicator-color-checked: transparent !important;
}



回答2:


Please go and paste below code in your variables.scss it will work

.segment-button-checked{
  --border-width:0px;
  --indicator-color-checked: 0;   
}


来源:https://stackoverflow.com/questions/55919872/how-to-remove-ionic-4-segment-indicator-bottom-line-please-let-me-know

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!