Mayanming

One day mayanming will be somebody

真实项目需要引用一些效果(前端交互),手写完后感觉还可以就想多了解下遇到大神的博客详解,我想跟自己说我想做一个切图仔。

先上大神的信息

自己手写的动画效果

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
30
31
32
/* // 点击效果 */
.waves {
position: relative;
overflow: hidden;
-webkit-tap-highlight-color:transparent;
}
.waves:after {
content: "";
display: block;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
pointer-events: none;
background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
background-repeat: no-repeat;
background-position: 50%;
transform: scale(10, 10);
opacity: 0;
transition: transform .3s, opacity .5s ease-out;
}

.waves.dark-waves:after{
background-image: radial-gradient(circle, #333 10%, transparent 10.01%);
}

.waves:active:after {
transform: scale(0, 0);
opacity: .3;
transition: 0s;
}

真实项目点击效果

评论