Appearance
汉堡菜单
html
<span class="open-icon-menu"></span>
<style>
.open-icon-menu {
display: inline-block;
position: relative;
border-top: 1px var(--color-font-2) solid;
width: 14px;
height: 12px;
box-sizing: border-box;
cursor: pointer;
transition: all .5s;
}
.open-icon-menu::before {
content: '';
display: inline-block;
position: absolute;
top: 6px;
-ms-transform: translateY(-200%);
transform: translateY(-200%);
left: 0px;
right: 0;
height: 1px;
background: var(--color-font-2);
transition: all .5s;
}
.open-icon-menu::after {
content: '';
display: inline-block;
position: absolute;
bottom: 1px;
right: 0px;
left: 0;
height: 1px;
background: var(--color-font-2);
transition: all .5s;
}
.open-icon-menu:hover {
border-color: var(--app-color-2);
}
.open-icon-menu:hover::before,
.open-icon-menu:hover::after {
background: var(--app-color-2);
}
</style>
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
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