原生js实现双滑块范围选择拖动取值器代码

代码语言:html

所属分类:拖放

代码描述:原生js实现双滑块范围选择拖动取值器代码纹扩散动画效果代码

代码标签: 原生 js 双滑块 范围 选择 拖动 取值器 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html>
<head>
   
<meta charset="UTF-8">
   
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum=1.0,minimum=1.0,user-scalable=0" />
 
   
     
<style>
     
#slideTool{
   
width: 305px;
   
height: 3px;
   
position: relative;
   
background-color: lightgray;
   
display: inline-block;
}
#slideLeft{width: 0px;height: 3px;background-color: lightgray;position: absolute;z-index: 20;}
#slideRight{width: 300px;height: 3px;background: #ab6969;position: absolute;}
#slider1{height: 15px;width: 15px;background: white;border: 1px solid #ab6969;display: block;border-radius: 10px;position: absolute;top: -6px;z-index: 20;}
#slider2{height: 15px;width: 15px;background: white;border: 1px solid #ab6969;display: block;border-radius: 10px;position: absolute;top: -6px;left:300px;z-index: 20;}
#value1{
   
margin-top: -25px;
   
position: absolute;
   
width: 30px;
   
background-color: black;
   
color: white;
   
text-align: center;
   
margin-left: -20px;
   
border-radius: 3px;
}
#value2{
   
margin-top: -25px;
   
position: absolute;
   
width: 30px;
   
background-color: black;
   
color: white;
   
text-align: center;
   
border-radius: 3px;
}
#slideToolBorder{
   
margin-left: 80px;
   
margin-top: 50px;
   
background-color: white;
   
width: 400px;
   
border: solid 1px brown;
}
#slideTitle{
   
display: inline-block;
   
background-color: #ab6969;
   
height: 30px;
   
width: 70px;
   
text-align: center;
   
line-height: 30px;
   
/*border-left: solid 1px brown;*/
   
border-right: solid 1px brown;
}
#titleSpan{
   
color: white;
}

     
</style>
</head>
<body>
   
<div id="slideToolCtrol">
       
<div id="slideToolBorder">
               
<div id="slideTitle">
                       
<span id="titleSpan">档位</span>
               
</div>
                <div id="sl.........完整代码请登录后点击上方下载按钮下载查看

网友评论0