-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
66 lines (59 loc) · 1.3 KB
/
style.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
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
background-color: #535353;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
.menu-btn{
position: relative;
display: flex;
justify-content: center;
align-items: center;
width: 80px;
height: 80px;
cursor: pointer;
transition: all .3s ease-in-out;
border: 3px solid white;
}
.menu-btn_burger{
width: 50px;
height: 6px;
background: white;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(255,101,47,.2);
transition: all .5s ease-in-out;
}
.menu-btn_burger::before,.menu-btn_burger::after{
content: '';
position: absolute;
width: 50px;
height: 6px;
background: white;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(255,101,47,.2);
transition: all .5s ease-in-out;
}
.menu-btn_burger::before{
transform: translateY(-16px);
}
.menu-btn_burger::after{
transform: translateY(16px);
}
/* Animation */
.menu-btn.open .menu-btn_burger{
transform: translateX(-50px);
background: transparent;
box-shadow: none;
}
.menu-btn.open .menu-btn_burger::before{
transform: rotate(45deg) translate(35px,-35px);
}
.menu-btn.open .menu-btn_burger::after{
transform: rotate(-45deg) translate(35px,35px);
}