ionic 2 how to customize ion-range?

前端 未结 1 720
有刺的猬
有刺的猬 2021-01-15 00:16

in ionic 2, I want to customize the ion-range to be something like the following pic, or I should say : is there way to customize ion-range

相关标签:
1条回答
  • 2021-01-15 00:52

    I did find out how to customize "ion-range", and here is what I built (I know it look not exact):

    here are my steps:- 1- add these line of codes shown on picture to your src\theme\variables.scss

    Note: there is many variables you can use to customize your ion-range in the folowing link ionic2 docs

    2- here is my component code:

    <ion-footer>
      <ion-toolbar>
        <ion-row>
          <ion-col width-33 text-left>
            Sedan
          </ion-col>
          <ion-col width-33 text-center>
            SUV
          </ion-col>
          <ion-col width-33 text-right>
            LUX
          </ion-col>
        </ion-row>
        <ion-range (ionChange)="selectCar()" min="500" max="1500" step="500" snaps="true" [(ngModel)]="value">
        </ion-range>
    
      </ion-toolbar>
     </ion-footer>

    0 讨论(0)
提交回复
热议问题