我们可以将ionic2段标题滚动到点击的段标题
<div>
<ion-scroll #scroll scrollX="true" class="browse-item-scrollx">
<ion-segment [(ngModel)]="pet" color="primary">
<ion-segment-button (click)="goto(0)" value="1" tappable>
1
</ion-segment-button>
<ion-segment-button (click)="goto(1)" value="2" tappable>
2
</ion-segment-button>
<ion-segment-button (click)="goto(2)" value="3" tappable>
3
</ion-segment-button>
<ion-segment-button (click)="goto(3)" value="4" tappable>
4
</ion-segment-button>
</ion-segment>
</ion-scroll>
</div>
第1,第2段标题可见;第3段标题是半可见的;第4段不可见。所以当用户点击第3段标题时,它应该滚动,第3段标题应该完全可见。是否可以这样做。