-
Notifications
You must be signed in to change notification settings - Fork 0
/
滑块解锁.html
29 lines (28 loc) · 928 Bytes
/
滑块解锁.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>滑块解锁</title>
<style>
*{margin-left: 0;padding: 0;}
div{ width: 300px;height: 60px; background: #879;position: absolute;left: 50%;top: 80px;margin-left: -150px; }
div span{ width: 100%;height: 100%; font-size: 40px; line-height: 60px;text-align: center; position: absolute;left: 0;top: 0; }
@keyframes test{
from{background-position:-645px 0;}
to{background-position:-365px 0;}
}
div span.mask{ background: -webkit-linear-gradient(-45deg,#000 40px,#fff 60px,#000 70px);-webkit-background-clip:text; color: rgba(0,0,0,0); background-position:-645px 0;
animation-name:test;
animation-timing-function: linear;
animation-duration: 0.8s;
animation-iteration-count: infinite;
}
</style>
</head>
<body>
<div>
<span>滑动滑块解锁</span>
<span class="mask">滑动滑块解锁</span>
</div>
</body>
</html>