来自于GitHub,
如何快速访问GitHub
先附上效果图
划到一半停止回自己回去的
PS:
附上代码,有需要自己更改,
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>滑块解锁封装js方法</title>
<!--注:这里首次用到了iconfont的语法,即矢量图标-->
<link rel="stylesheet" href="font/iconfont.css">
<style>
*{
padding: 0;
margin: 0;
}
#box{
position: relative;
width: 300px;
height: 40px;
margin: 0 auto;
margin-top: 10px;
background-color: #e8e8e8;
box-shadow: 1px 1px 5px rgba(0,0,0,0.2);
}
.bgColor{
position: absolute;
left:0;
top:0;
width:40px;
height: 40px;
background-color: lightblue;
}
.txt{
position: absolute;
width: 100%;
height: 40px;
line-height: 40px;
font-size: 14px;
color: #000;
text-align: center;
}
.slider{