-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathburger_css.css
93 lines (74 loc) · 1.46 KB
/
burger_css.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
html, body {
max-width: 100%;
overflow-x: hidden;
}
.croix span {
width: 100%;
height: 1px;
border-radius: 12px;
display: block;
}
.croix span::before,
.croix span::after {
content: "";
width: 20px;
background-color: black;
display: block;
border-radius: 12px;
height: 3px;
}
.croix span::before {
transform: translateY(-10px);
transform: rotate(45deg);
}
.croix span::after {
transform: translateY(10px);
transform: rotate(-45deg);
margin-top: -3px;
}
/*===============================*/
.burger {
width: 20px;
height: 15px;
cursor: pointer;
z-index: 20;
position: relative;
top: 50%;
left: 50%;
}
.burger span {
width: 100%;
height: 4px;
background-color: white;
border-radius: 12px;
display: block;
transition: background-color 0.5s ease-in-out;
position: relative;
top: 50%;
}
.burger span::before,
.burger span::after {
content: "";
width: 100%;
background-color: white;
display: block;
transition: all 0.5s ease-in-out;
border-radius: 12px;
height: 4px;
}
.burger span::before {
transform: translateY(-10px);
}
.burger span::after {
transform: translateY(10px);
margin-top: -4px;
}
.burger.active span {
background-color: transparent;
}
.burger.active span::before {
transform: rotateZ(45deg) translateY(0);
}
.burger.active span::after {
transform: rotateZ(-45deg) translateY(0);
}