【发布时间】:2019-10-21 22:07:28
【问题描述】:
我正在寻找一个选项来做一个附加的角垫滑块。 enter image description here
我正在开发类似下面的东西,使用覆盖垫滑块的样式。但无法执行以下操作。
- 在方框内添加两条小线。
- 为滑块的第二部分添加自定义颜色。(使用浅蓝色而不是灰色。)
HTML:
<mat-slider [(ngModel)]="value1"></mat-slider>
**styles.sass:**
.mat-slider.mat-slider-horizontal .mat-slider-wrapper
top: 18px
.mat-slider.mat-slider-horizontal .mat-slider-track-wrapper
height: 12px
border-radius: 10px
.mat-slider.mat-slider-horizontal .mat-slider-track-background,
.mat-slider.mat-slider-horizontal .mat-slider-track-fill
height: 100%
.mat-slider.mat-slider-horizontal .mat-slider-track-fill
background-color: #7eacff
.mat-accent .mat-slider-thumb
height: 30px
width: 30px
background-color: white
border: solid 2px #f6f7f8
bottom: -20px
right: -20px
.mat-slider-min-value:not(.mat-slider-thumb-label-showing) .mat-slider-thumb
background-color: white
.mat-form-field
width: 85px
.mat-progress-spinner circle, .mat-spinner circle
stroke: #3fb53f
.mat-accent .mat-slider-thumb
height: 30px
width: 30px
background-color: white
/* border: solid 1px #003087; */
bottom: -20px
right: -20px
border-radius: 8px
【问题讨论】:
-
到目前为止你尝试过什么代码?你能编辑你的问题并添加它吗?