-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathstyle.css
More file actions
66 lines (50 loc) · 1.49 KB
/
style.css
File metadata and controls
66 lines (50 loc) · 1.49 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/* General stuff ----------------------------- */
html {
height: 100%;
}
body {
margin: 0;
width: 100%;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
#icons {
user-select: none;
border-radius: 50px;
padding: 0 20px;
margin: 0 40px;
background-color: hsla(0, 0%, 0%, .02);
box-shadow: inset 0 1px 4px hsla(0, 0%, 0%, .1), 0 1px 2px hsla(0, 0%, 100%, .3);
}
/* Animated Icons using SVG with CSS masks */
i {
display: inline-block;
cursor: pointer;
width: 250px;
height: 231px;
background: url('method-draw-image.svg');
/* Fallback Background If CSS Masks is not supported by a browser */
background-image: -webkit-radial-gradient( 50% 50%, 60% 80%, hsla(0, 100%, 50%, .7), hsla(0, 100%, 20%, .8) 60%, hsla(0, 100%, 10%, 1));
-webkit-mask-image: url('method-draw-image.svg'), url('method-draw-image-face.svg');
-webkit-mask-position: 0 0, 0px 12px;
transition: -webkit-mask-position .5s ease-out;
}
i:hover {
background-image: -webkit-radial-gradient( 50% 50%, 60% 80%, hsla(120, 100%, 50%, .7), hsla(120, 100%, 20%, .8) 60%, hsla(120, 100%, 10%, 1));
-webkit-mask-position: 0 0, 0px -2px;
transition: -webkit-mask-position .1s cubic-bezier(0, .40, .20, 1);
}
i:active {
transform: translateY(2px);
animation: robot-active .1s .2s cubic-bezier(.70, 0, .30, 1) infinite alternate;
}
@-webkit-keyframes robot-active {
0% {
-webkit-mask-position: 0 0, -14px 0px;
}
100% {
-webkit-mask-position: 0 0, 14px 0px;
}
}