vue实现多种滑块刻度效果代码
代码语言:html
所属分类:表单美化
代码描述:vue实现多种滑块刻度效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { background: #434d5a; padding: 20px; font-family: "Heebo", sans-serif; color: white; } .slider-pips { position: relative; margin: 30px 0; min-height: 40px; color: #8e9cad; font-size: 12px; } .slider-pips__range { width: 100%; -webkit-appearance: none; -moz-appearance: none; appearance: none; height: 4px; display: inline-block; background: transparent; position: absolute; left: 0; right: 0; top: 0; } .slider-pips__range::-webkit-slider-runnable-track { -webkit-appearance: none; appearance: none; position: relative; background: #8e9cad; height: 4px; border-radius: 4px; } .slider-pips__range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; position: relative; width: 12px; height: 12px; background: #6ef4a4; box-shadow: 0 0 0 2px #434d5a; border-radius: 100%; -webkit-transform: translateY(-4px); transform: translateY(-4px); z-index: 1; } .slider-pips__range:focus, .slider-pips__range:focus::-webkit-slider-runnable-track { outline: none; } .slider-pips__range-selection { position: absolute; top: 0px; height: 4px; background: #6ef4a4; border-radius: 3px; transition: all 0.2s ease-out; } .slider-pips__pips, .slider-pips__floats { position: relative; list-style: none; margin: 0 6px; } .slider-pips__pips { top: 12px; } .slider-pips__pip { position: absolute; top: -5px; left: 0; width: 1px; height: 6px; background: currentColor; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; transition: all 0.5s ease; cursor: pointer; } .slider-pips__pip:hover { color: white; } .slider-pips__pip--selected { color: #86f6b3; height: 10px; transition: all 0.05s ease; } .slider-pips__pip--selected--2 { color: #e69ffa; } .slider-pips__pip--selected--3 { color: #f59d71; } .slider-pips__pip--selected--4 { color: #33d5ff; } .slider-pips__label { position: absolute; left: 50%; top: 100%; -webkit-transform: translate(-50%, 0px); transform: translate(-50%, 0px); padding: 3px; } .slider-pips__label--hidden { display: none; } .slider-pips__float { position: absolute; top: -20px; -webkit-transform: translateX(-15px); transform: translateX(-15px); width: 30px; text-align: center; pointer-events: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; z-index: 1; } .slider-pips__float--2 { z-index: 2; } .slider-pips__float--3 { z-index: 3; } .slider-pips__float--4 { z-index: 4; } .slider-pips__range--2::-webkit-slider-thumb { z-index: 2; } .slider-pips__range--2.slider-pips__range::-webkit-slider-thumb { background: #d96ff7; } .slider-pips__range--3::-webkit-slider-thumb { z-index: 3; } .slider-pips__range--3.slider-pips__range::-webkit-slider-thumb { background: #f27c41; } .slider-pips__range--4::-webkit-slider-thumb { z-index: 4; } .slider-pips__range--4.slider-pips__range::-webkit-slider-thumb { background: #00cbff; } .huge.slider-pips { margin-top: 30px; } .huge.slider-pips ::-webkit-slider-thumb { height: 15px; margin-top: -2px; width: 26px; border-radius: 3px; } .huge.slider-pips .slider-pips__pip { height: 5px; width: 2px; transition-duration: 1s; } .huge.slider-pips .slider-pips__pip:nth-child(5n + 1) { height: 9px; } .huge.slider-pips .slider-pips__pip--selected { height: 12px !impor.........完整代码请登录后点击上方下载按钮下载查看
网友评论0