@prefixClass: rc-slider; // color @sliderColor: #999; @trackColor: #b2e9fd; @normalHandleColor: #d9d9d9; @activeHandleColor: #2db7f5; @disabledColor: #e9e9e9; .@{prefixClass} { position: relative; height: 4px; width: 100%; border-radius: 2px; background-color: @sliderColor; &-track { position: absolute; height: 4px; border-radius: 2px; background-color: @trackColor; z-index: 1; } &-handle { position: absolute; margin-left: -7px; margin-top: -5px; width: 10px; height: 10px; cursor: default; border-radius: 50%; border: solid 2px @normalHandleColor; background-color: #fff; z-index: 2; &:hover, &:active, &.active { border-color: @activeHandleColor; } &:active { background-color: @activeHandleColor; box-shadow: 0 0 3px 0 rgb(45, 183, 245, .75); } } &-mark { position: absolute; top: 10px; left: 0px; width: 100%; height: 20px; font-size: 12px; z-index: 3; } &-mark-text { position: absolute; display: inline-block; line-height: 1.5; height: 20px; vertical-align: middle; text-align: center; cursor: pointer; &:first-child { text-align: left; } } &-step { position: absolute; width: 100%; height: 4px; background: transparent; z-index: 1; .dot { position: absolute; top: -2px; margin-left: -4px; width: 4px; height: 4px; border: 2px solid #fff; cursor: pointer; border-radius: 50%; vertical-align: middle; &:first-child { margin-left: -2px; } &:last-child { margin-left: -6px; } } } &-disabled { color: @disabledColor; background-color: @disabledColor; .@{prefixClass}-track { background-color: @disabledColor; } .@{prefixClass}-handle { border-color: @disabledColor; background-color: @disabledColor; cursor: not-allowed; &:hover, &:active { border-color: @disabledColor; background-color: @disabledColor; box-shadow: none; } } .@{prefixClass}-mark-text, .dot { cursor: not-allowed!important; } } }