-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
124 lines (115 loc) · 2.82 KB
/
styles.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
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container {
width: 100%;
height: 50vh;
background: #0d0024;
display: flex;
justify-content: center;
align-items: center;
gap: 50px;
}
.menu {
width: 200px;
height: 200px;
margin: 8px;
background-image: linear-gradient(to right, #e91e63, #f44336);
border-radius: 16px;
cursor: pointer;
}
.menu div{
width: 120px;
height: 120px;
margin: 40px;
position: relative;
}
.menu span{
background: #fff;
width: 100px;
height: 10px;
border-radius: 5px;
display: block;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
transition: all 0.35s;
}
/* Button 1 */
.menu span:nth-child(1){
transform: translate(-50%, -40px);
}
.menu span:nth-child(3){
transform: translate(-50%, 30px);
}
/* Active 1 */
.menu.active span:nth-child(1){
transform: translate(-50%, -50%) rotate(45deg);
}
.menu.active span:nth-child(2){
width: 0;
}
.menu.active span:nth-child(3){
transform: translate(-50%, -50%) rotate(-45deg);
}
/* Button 2 */
.container:nth-child(1) .menu:nth-child(2) span:nth-child(1){
width: 50%;
transform: translate(-50px, -40px);
}
.container:nth-child(1) .menu:nth-child(2) span:nth-child(3){
width: 50%;
transform: translate(-10px, 30px);
}
/* Active 2 */
.container:nth-child(1) .menu:nth-child(2).active-2 span:nth-child(1){
width: 100px;
transform: translate(-50%, -50%) rotate(225deg);
}
.container:nth-child(1) .menu:nth-child(2).active-2 span:nth-child(2){
width: 0px;
opacity: 0;
transform: rotate(720deg);
}
.container:nth-child(1) .menu:nth-child(2).active-2 span:nth-child(3){
width: 100px;
transform: translate(-50%, -50%) rotate(-225deg);
}
/* Button 3 */
.container:nth-child(2) .menu span:nth-child(1){
width: 50%;
transform: translate(-50px, -40px);
}
.container:nth-child(2) .menu span:nth-child(3){
width: 50%;
transform: translate(-10px, 30px);
}
/* Active 3 */
.container:nth-child(2) .menu.active-3 span:nth-child(1){
transform: translate(-50%, -50%) rotate(45deg);
}
.container:nth-child(2) .menu.active-3 span:nth-child(2){
width: 0;
}
.container:nth-child(2) .menu.active-3 span:nth-child(3){
transform: translate(-50%, -50%) rotate(-45deg);
}
/* Button 4 */
.container:nth-child(2) .menu:nth-child(2) span:nth-child(1){
width: 50%;
transform: translate(-50px, -40px);
}
.container:nth-child(2) .menu:nth-child(2) span:nth-child(3){
width: 50%;
transform: translate(-10px, 30px);
}
/* Active 4 */
.container:nth-child(2) .menu:nth-child(2).active-4 span:nth-child(1){
transform: translate(-100%, 13px) rotate(225deg);
}
.container:nth-child(2) .menu:nth-child(2).active-4 span:nth-child(3){
transform: translate(-100%, -23px) rotate(-225deg);
}