Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Background color for ionic toggle and range

Please refer to this image

I am using ionic to make a mobile app. I want to add a background to toggle button and range. I used toggle/range-background-dark. It did not work

      <ion-toggle toggle-class="toggle-balanced toggle-background-dark" ng-model="check">
          33
      </ion-toggle> 

      <div class="item range range-balanced range-background-dark">
          <i class="icon ion-ios-sunny-outline"></i>
            <input type="range" name="volume" min="0" max="100" ng-model="RV">
          <i class="icon ion-ios-sunny"></i>
      </div>
like image 310
UniSound Waterloo Avatar asked Aug 05 '26 21:08

UniSound Waterloo


1 Answers

You can change toggle button and range background color using this css

.toggle input:checked + .track {
    background-color: #8577b5;
    border-color: #8577b5;
}

.range.range - balanced input::-webkit - slider - thumb: before {
    background: #8577b5;}
.range.range-light input::-webkit-slider-thumb:before {
    background: # ddd;}
.range.range - stable input::-webkit - slider - thumb: before {
    background: #b2b2b2;
}
.range.range - positive input::-webkit - slider - thumb: before {
    background: #4a87ee; }
.range.range-calm input::-webkit-slider-thumb:before {
    background: #43cee6;
}
.range.range - assertive input::-webkit - slider - thumb: before {
    background: #ef4e3a;
}
.range.range - energized input::-webkit - slider - thumb: before {
    background: #f0b840;
}
.range.range - royal input::-webkit - slider - thumb: before {
    background: #8a6de9; }
.range.range-dark input::-webkit-slider-thumb:before {
    background: #444;
}
like image 146
Ved Avatar answered Aug 08 '26 10:08

Ved



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!