-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles2.css
154 lines (131 loc) · 3.41 KB
/
styles2.css
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
body {
/*background-color: #9AB3F5;*/
background-color: #BDCCF4;
background-repeat: no-repeat;
background-size: cover;
}
ul {
padding: 1.5rem;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
gap: 4rem;
list-style: none;
}
button {
outline: none;
display: inline-block;
position: relative;
overflow: hidden;
border: 2px solid #EEEEEE;
color: #EEEEEE;
font-size:1rem;
padding: 1.125rem;
cursor: pointer;
background: #202020;
user-select: none;
-webkit-user-select: none;
touch-action: manipulation;
}
button span:first-child {
position: relative;
transition: color 600ms cubic-bezier(0.48, 0, 0.12, 1);
z-index: 1;
}
button span:last-child {
color: #EEEEEE;
display: block;
position: absolute;
bottom: 0;
transition: all 500ms cubic-bezier(0.48, 0, 0.12, 1);
z-index: 3;
opacity: 0;
top: 50%;
left: 50%;
height: 1rem;
}
button:after {
content: "";
position: absolute;
width: 110%;
height: 100%;
z-index: 2;
transition: transform 600ms cubic-bezier(0.48, 0, 0.12, 1);
}
button:hover span:last-child, button:focus span:last-child {
opacity: 1;
transition: all 900ms cubic-bezier(0.48, 0, 0.12, 1);
}
/* Left */
.left span:last-child {
transform: translate(-250%,-50%);
}
.left:after {
background-color: grey;
left: -50%;
top: 0;
transform: skewX(9.3deg) scaleX(0);
transform-origin: left center;
}
.left:hover:after, .left:focus:after {
transform-origin: left center;
transform: skewX(9.3deg) scaleX(2);
}
.left:hover span:last-child, .left:focus span:last-child {
transform:translate(-50%,-65%);
}
/* Up */
.up span:last-child {
transform: translate(-50%,-425%);
}
.up:after {
background-color: grey;
top: -50%;
left: 0;
transform: skewY(9.3deg) scaleY(0);
transform-origin: top center;
}
.up:hover:after, .up:focus:after {
transform-origin: top center;
transform: skewY(9.3deg) scaleY(2);
}
.up:hover span:last-child, .up:focus span:last-child {
transform: translateX(-50%) translateY(-50%);
}
/* Right */
.right span:last-child {
transform: translate(250%,-50%);
}
.right:after {
background-color: grey;
right: -50%;
top: 0;
transform: skewX(9.3deg) scaleX(0);
transform-origin: right center;
}
.right:hover:after, .right:focus:after {
transform-origin: right center;
transform: skewX(9.3deg) scaleX(2);
}
.right:hover span:last-child, .right:focus span:last-child {
transform:translate(-50%,-65%);
}
/* Down */
.down span:last-child {
transform: translate(-50%,225%);
}
.down:after {
background-color: grey;
bottom: -50%;
left: 0;
transform: skewY(9.3deg) scaleY(0);
transform-origin: bottom center;
}
.down:hover:after, .down:focus:after {
transform-origin: bottom center;
transform: skewY(9.3deg) scaleY(2);
}
.down:hover span:last-child, .down:focus span:last-child {
transform: translateX(-50%) translateY(-65%);
}