当前位置:   article > 正文

html5输入框旁边有渐变色,HTML5 渐变色彩范围输入控件

input框渐变色

CSS

语言:

CSSSCSS

确定

body,

html {

background-color: #1d1c25;

margin: 0;

padding: 0;

}

.range {

-webkit-appearance: none;

-moz-appearance: none;

position: absolute;

left: 50%;

top: 50%;

width: 200px;

margin-top: 10px;

transform: translate(-50%, -50%);

}

input[type=range]::-webkit-slider-runnable-track {

-webkit-appearance: none;

background: #3bade3;

background: -moz-linear-gradient(45deg, #3bade3 0%, #576fe6 25%, #9844b7 51%, #ff357f 100%);

background: -webkit-gradient(left bottom, right top, color-stop(0%, #3bade3), color-stop(25%, #576fe6), color-stop(51%, #9844b7), color-stop(100%, #ff357f));

background: -webkit-linear-gradient(45deg, #3bade3 0%, #576fe6 25%, #9844b7 51%, #ff357f 100%);

background: -o-linear-gradient(45deg, #3bade3 0%, #576fe6 25%, #9844b7 51%, #ff357f 100%);

background: -ms-linear-gradient(45deg, #3bade3 0%, #576fe6 25%, #9844b7 51%, #ff357f 100%);

background: linear-gradient(45deg, #3bade3 0%, #576fe6 25%, #9844b7 51%, #ff357f 100%);

filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#3bade3 ', endColorstr='#ff357f ', GradientType=1);

height: 2px;

}

input[type=range]:focus {

outline: none;

}

input[type=range]::-moz-range-track {

-moz-appearance: none;

background: #3bade3;

background: -moz-linear-gradient(45deg, #3bade3 0%, #576fe6 25%, #9844b7 51%, #ff357f 100%);

background: -webkit-gradient(left bottom, right top, color-stop(0%, #3bade3), color-stop(25%, #576fe6), color-stop(51%, #9844b7), color-stop(100%, #ff357f));

background: -webkit-linear-gradient(45deg, #3bade3 0%, #576fe6 25%, #9844b7 51%, #ff357f 100%);

background: -o-linear-gradient(45deg, #3bade3 0%, #576fe6 25%, #9844b7 51%, #ff357f 100%);

background: -ms-linear-gradient(45deg, #3bade3 0%, #576fe6 25%, #9844b7 51%, #ff357f 100%);

background: linear-gradient(45deg, #3bade3 0%, #576fe6 25%, #9844b7 51%, #ff357f 100%);

filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#3bade3 ', endColorstr='#ff357f ', GradientType=1);

height: 2px;

}

input[type=range]::-webkit-slider-thumb {

-webkit-appearance: none;

border: 2px solid;

border-radius: 50%;

height: 25px;

width: 25px;

max-width: 80px;

position: relative;

bottom: 11px;

background-color: #1d1c25;

cursor: -webkit-grab;

-webkit-transition: border 1000ms ease;

transition: border 1000ms ease;

}

input[type=range]::-moz-range-thumb {

-moz-appearance: none;

border: 2px solid;

border-radius: 50%;

height: 25px;

width: 25px;

max-width: 80px;

position: relative;

bottom: 11px;

background-color: #1d1c25;

cursor: -moz-grab;

-moz-transition: border 1000ms ease;

transition: border 1000ms ease;

}

.range.blue::-webkit-slider-thumb {

border-color: #3bade3;

}

.range.ltpurple::-webkit-slider-thumb {

border-color: #576fe6;

}

.range.purple::-webkit-slider-thumb {

border-color: #9844b7;

}

.range.pink::-webkit-slider-thumb {

border-color: #ff357f;

}

.range.blue::-moz-range-thumb {

border-color: #3bade3;

}

.range.ltpurple::-moz-range-thumb {

border-color: #576fe6;

}

.range.purple::-moz-range-thumb {

border-color: #9844b7;

}

.range.pink::-moz-range-thumb {

border-color: #ff357f;

}

input[type=range]::-webkit-slider-thumb:active {

cursor: -webkit-grabbing;

}

input[type=range]::-moz-range-thumb:active {

cursor: -moz-grabbing;

}

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/564079
推荐阅读
相关标签
  

闽ICP备14008679号