-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu1.css
146 lines (131 loc) · 3.62 KB
/
menu1.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
:root {
--base-grid: 8px;
--colour-white: #fff;
--colour-black: #1a1a1a;
}
*, :after, :before {
box-sizing: border-box;
}
html {
margin: 0;
padding: 0;
background-image: linear-gradient(-160deg,#ffccff 20%,#88ed88);
background-position: 100%;
}
/* body {
background-image: linear-gradient(270deg,#a555de 3px,transparent 0),linear-gradient(#570d6a 3px,transparent 0),linear-gradient(270deg,rgba(73, 32, 131, 0.4) 1px,transparent 0),linear-gradient(#6b1588 1px,transparent 0),linear-gradient(270deg,rgba(70, 13, 97, 0.4) 1px,transparent 0),linear-gradient(#420f56 1px,transparent 0);
background-size: 112px 112px,112px 112px,56px 56px,56px 56px,28px 28px,28px 28px;
font-family: Josefin Sans, sans-serif;
margin: 0;
padding: 0;
}
*/
.links {
--link-size: calc(var(--base-grid)*20);
color: var(--colour-black);
display: flex;
justify-content: center;
align-items: center;
width: 100%;
min-height: 100vh;
}
.links__list {
position: relative;
list-style: none;
}
.links__item {
width: var(--link-size);
height: var(--link-size);
position: absolute;
top: 0;
left: 0;
margin-top: calc(var(--link-size)/-2);
margin-left: calc(var(--link-size)/-2);
--angle: calc(360deg/var(--item-total));
--rotation: calc(140deg + var(--angle)*var(--item-count));
transform: rotate(var(--rotation)) translate(calc(var(--link-size) + var(--base-grid)*2)) rotate(calc(var(--rotation)*-1));
}
.links__link {
opacity: 0;
animation: on-load .3s ease-in-out forwards;
animation-delay: calc(var(--item-count)*150ms);
width: 100%;
height: 100%;
border-radius: 50%;
position: relative;
background-image: linear-gradient(-60deg,#c297d0 20%,#9d78b1);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-decoration: none;
color: inherit;
}
.links__icon {
width: calc(var(--base-grid)*8);
height: calc(var(--base-grid)*8);
transition: all .3s ease-in-out;
fill: var(--colour-black);
}
.links__text {
position: absolute;
width: 100%;
left: 0;
text-align: center;
height: calc(var(--base-grid)*2);
font-size: calc(var(--base-grid)*2);
display: none;
bottom: calc(var(--base-grid)*8.5);
animation: text .3s ease-in-out forwards;
}
.links__link:after {
content: "";
background-color: transparent;
width: var(--link-size);
height: var(--link-size);
border: 2px dashed var(--colour-black);
display: block;
border-radius: 50%;
position: absolute;
top: 0;
left: 0;
transition: all .3s cubic-bezier(.53,-.67,.73,.74);
transform: none;
opacity: 0;
}
.links__link:hover .links__icon {
transition: all .3s ease-in-out;
transform: translateY(calc(var(--base-grid)*-1));
}
.links__link:hover .links__text {
display: block;
}
.links__link:hover:after {
transition: all .3s cubic-bezier(.37,.74,.15,1.65);
transform: scale(1.1);
opacity: 1;
}
@keyframes on-load {
0% {
opacity: 0;
transform: scale(.3);
}
70% {
opacity: .7;
transform: scale(1.1);
}
100% {
opacity: 1;
transform: scale(1);
}
}
@keyframes text {
0% {
opacity: 0;
transform: scale(0.3) translateY(0);
}
100% {
opacity: 1;
transform: scale(1) translateY(calc(var(--base-grid)*5));
}
}