是否有人知道如何将段按钮的css从正方形更改为圆形?

我试过使用普通的css,但是当ionic2试图转换segment-activated上的按钮时,它会变得很糟糕--这里是一个柱塞示例
<ion-segment [(ngModel)]="date" danger>
<ion-segment-button value="1">
1
</ion-segment-button>
<ion-segment-button value="2">
2
</ion-segment-button>
<ion-segment-button value="3">
3
</ion-segment-button>
</ion-segment>对于普通css,我失败了。当你选择另一个按钮时会变得很奇怪

发布于 2016-08-01 08:14:50
找到了一个黑客来做这个。NB这是一个黑客和风格不打算这一点。
Css解决方案:将其放在您的.scss文件中
ion-segment-button{
//max-width: 25px;
border-style: solid;
}
.segment-button {
border-style: none;
border-color: #e62100;
color: #e62100;
border-width: thin;
}
.segment-button:first-of-type {
border-radius: 90px 90px 90px 90px;
// margin-right: 0px;
margin-left: 0px;
line-height: 3.4rem;
height: 100%;
width: 100%}
.segment-button:not(:first-of-type) {
border-radius: 90px 90px 90px 90px;
// margin-right: 0px;
margin-left: 20px;
line-height: 3.4rem;
height: 100%;
width: 100%;}
.segment-button:last-of-type {
border-radius: 90px 90px 90px 90px;
margin-right: 0px;
margin-left: 20px;
line-height: 3.4rem;
height: 100%;
width: 100%;}
.segment-activated{
background-color: #e62100;
color: #ffffff;
}https://stackoverflow.com/questions/38527700
复制相似问题