nav0.less
2.65 KB
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
@import './custom.less';
@header: header0;
.@{header} {
background: @template-nav-bg-color;
width: 100%;
z-index: 1;
box-shadow: 0 5px 8px fade(#000, 15);
position: relative;
top: 0;
.home-page {
padding: 0 24px;
}
&-logo {
display: inline-block;
position: relative;
width: 150px;
line-height: 64px;
& img {
vertical-align: middle;
display: inline-block;
}
& a {
display: block;
}
}
&-menu {
float: right;
>.ant-menu {
line-height: 62px;
background: transparent;
color: @template-text-color-light;
height: 64px;
border-bottom-color: transparent;
position: relative;
a {
// color: @template-text-color-light;
&:hover {
color: @primary-color;
}
}
}
}
.ant-menu-item-selected a {
color: @primary-color;
}
}
@media screen and (max-width: 767px) {
.@{header} {
&-logo {
z-index: 101;
}
&.home-page-wrapper .home-page {
padding: 0 24px;
}
& &-menu {
height: auto;
float: inherit;
position: relative;
left: -24px;
width: ~"calc(100% + 48px)";
opacity: 0;
transition: opacity .3s @ease-in-out, height .3s @ease-in-out;
& li {
padding: 0 24px;
&.ant-menu-submenu {
padding: 0;
}
}
& .ant-menu-submenu .ant-menu-sub {
padding: 0 24px;
}
}
&-mobile-menu {
width: 16px;
height: 14px;
cursor: pointer;
position: absolute;
top: 24px;
right: 24px;
z-index: 100;
em {
display: block;
width: 100%;
height: 2px;
background: #fff;
margin-top: 4px;
transition: transform .3s @ease-in-out, opacity .3s @ease-in-out;
}
:first-child {
margin-top: 0;
}
}
.ant-menu {
height: auto;
overflow: hidden;
background: @template-bg-color;
.ant-menu-item-selected {
border: none;
}
a {
color: @template-text-color-light;
&:hover {
color: @template-text-color-light;
}
}
.ant-menu-item-selected a {
color: @template-text-color-light;
}
}
& .open {
height: auto;
.@{header}-mobile-menu {
em {
&:nth-child(1) {
transform: translateY(6px) rotate(45deg);
}
&:nth-child(2) {
opacity: 0;
}
&:nth-child(3) {
transform: translateY(-6px) rotate(-45deg);
}
}
}
>.@{header}-menu {
opacity: 1;
pointer-events: auto;
}
}
}
}