Skip to content

Commit d8b8a80

Browse files
committed
Updating menu
1 parent ffa03c2 commit d8b8a80

1 file changed

Lines changed: 47 additions & 31 deletions

File tree

static/css/custom-menu.css

Lines changed: 47 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
.navigation {
2-
position: relative;
3-
padding: 10px 0;
4-
background: #fff;
5-
border-bottom: 1px solid #eee;
6-
}
7-
81
.container.wrap {
92
display: flex;
103
align-items: center;
114
justify-content: space-between;
125
max-width: 1140px;
13-
padding: 0 15px;
6+
padding: 0 30px;
147
margin: 0 auto;
8+
background: #fff;
9+
border-bottom: 1px solid #eee;
10+
position: relative;
11+
}
12+
13+
.logo {
14+
padding-right: 15px;
1515
}
1616

1717
.logo img {
@@ -22,7 +22,7 @@
2222
.main-menu {
2323
display: flex;
2424
align-items: center;
25-
justify-content: space-between;
25+
justify-content: center;
2626
flex: 1;
2727
margin-left: 30px;
2828
}
@@ -32,6 +32,8 @@
3232
list-style: none;
3333
margin: 0;
3434
padding: 0;
35+
justify-content: center;
36+
gap: 30px;
3537
}
3638

3739
/* ハンバーガーメニュー */
@@ -97,13 +99,13 @@
9799

98100
.menu-item-has-children {
99101
position: static;
100-
padding: 0 15px;
102+
padding: 0;
101103
}
102104

103105
.menu-item-has-children > a {
104106
color: #333;
105107
text-decoration: none;
106-
font-weight: 500;
108+
font-weight: 700;
107109
padding: 15px 0;
108110
display: block;
109111
position: relative;
@@ -113,7 +115,7 @@
113115
.menu-item-has-children > a::after {
114116
content: '';
115117
position: absolute;
116-
bottom: 0;
118+
bottom: -1px;
117119
left: 0;
118120
width: 100%;
119121
height: 2px;
@@ -124,7 +126,7 @@
124126
/* デスクトップのみホバーエフェクト */
125127
@media (min-width: 993px) {
126128
.menu-item-has-children:hover > a::after {
127-
background: #0066cc;
129+
background: #0aa8a7 !important;
128130
}
129131

130132
.menu-item-has-children:hover .sub-menu {
@@ -135,7 +137,7 @@
135137
.sub-menu {
136138
display: none;
137139
position: fixed;
138-
top: 62px;
140+
top: 47px;
139141
left: 0;
140142
right: 0;
141143
background: #fff;
@@ -147,10 +149,10 @@
147149
.sub-menu::before {
148150
content: '';
149151
position: absolute;
150-
top: -10px;
152+
top: -1px;
151153
left: 0;
152154
right: 0;
153-
height: 10px;
155+
height: 1px;
154156
background: transparent;
155157
}
156158

@@ -290,46 +292,50 @@
290292
flex-wrap: nowrap;
291293
}
292294

293-
.main-menu {
294-
position: static;
295-
margin-left: 0;
296-
}
297-
298295
.main-menu__wrapper {
296+
justify-content: flex-start;
297+
gap: 0;
299298
display: none;
300299
position: absolute;
301300
top: 100%;
302301
left: 0;
303302
right: 0;
304303
background: #fff;
305-
padding: 20px;
304+
padding: 20px 30px;
306305
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
307306
z-index: 1000;
307+
flex-direction: column;
308+
width: 100%;
308309
}
309310

310311
.main-menu__wrapper.is-active {
311312
display: block;
312313
}
313314

314-
.main-menu__wrapper {
315-
flex-direction: column;
316-
width: 100%;
317-
}
318-
319315
.menu-item-has-children {
320316
padding: 0;
317+
list-style-type: none;
321318
}
322319

323320
.menu-item-has-children > a {
324-
padding: 12px 0;
321+
padding: 12px;
325322
border-bottom: 1px solid #eee;
323+
position: relative;
324+
}
325+
326+
.menu-item-has-children:first-child > a {
327+
border-top: none;
328+
}
329+
330+
.menu-item-has-children:last-child > a {
331+
border-bottom: none;
326332
}
327333

328334
/* モバイル時のサブメニュー表示制御 */
329335
.menu-item-has-children > a::after {
330336
content: '+';
331337
position: absolute;
332-
right: 0;
338+
right: 12px;
333339
top: 50%;
334340
transform: translateY(-50%);
335341
background: none;
@@ -345,7 +351,7 @@
345351
.sub-menu {
346352
position: static;
347353
box-shadow: none;
348-
padding: 0;
354+
padding: 0 0 0 15px;
349355
margin: 10px 0;
350356
display: none;
351357
}
@@ -357,7 +363,17 @@
357363
.col-container {
358364
grid-template-columns: 1fr;
359365
gap: 20px;
360-
padding: 15px;
366+
padding: 15px 30px;
367+
}
368+
369+
.menu {
370+
list-style-type: none;
371+
margin: 0;
372+
padding: 0;
373+
}
374+
375+
.menu-item {
376+
list-style-type: none;
361377
}
362378

363379
.hamburger {

0 commit comments

Comments
 (0)