質問編集履歴
3
HTMLの変更をしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,6 +14,18 @@
|
|
14
14
|
|
15
15
|
```
|
16
16
|
|
17
|
+
<div class="navBtn sp">
|
18
|
+
|
19
|
+
<div class="navBtn__inner">
|
20
|
+
|
21
|
+
<span></span><span></span><span></span>
|
22
|
+
|
23
|
+
</div>
|
24
|
+
|
25
|
+
</div>
|
26
|
+
|
27
|
+
</div>
|
28
|
+
|
17
29
|
<nav class="nav inner">
|
18
30
|
|
19
31
|
<ul>
|
2
cssの追加をしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -38,6 +38,242 @@
|
|
38
38
|
|
39
39
|
```
|
40
40
|
|
41
|
+
|
42
|
+
|
43
|
+
```
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
ナビ
|
48
|
+
|
49
|
+
--------------------*/
|
50
|
+
|
51
|
+
.nav {
|
52
|
+
|
53
|
+
width: 100%; }
|
54
|
+
|
55
|
+
@media screen and (max-width: 768px) {
|
56
|
+
|
57
|
+
.nav {
|
58
|
+
|
59
|
+
padding-top: 2%;
|
60
|
+
|
61
|
+
padding-bottom: 2%;
|
62
|
+
|
63
|
+
width: 80%;
|
64
|
+
|
65
|
+
height: 100vh;
|
66
|
+
|
67
|
+
background-image: url("../images/bg_01.jpg");
|
68
|
+
|
69
|
+
transform: translateX(100%);
|
70
|
+
|
71
|
+
transition: all 0.5s;
|
72
|
+
|
73
|
+
position: absolute;
|
74
|
+
|
75
|
+
right: 0; } }
|
76
|
+
|
77
|
+
@media screen and (max-width: 768px) {
|
78
|
+
|
79
|
+
.nav.open {
|
80
|
+
|
81
|
+
transform: translateX(0%); } }
|
82
|
+
|
83
|
+
@media screen and (min-width: 769px) {
|
84
|
+
|
85
|
+
.nav {
|
86
|
+
|
87
|
+
background-color: #fff; } }
|
88
|
+
|
89
|
+
.nav ul {
|
90
|
+
|
91
|
+
width: 100%; }
|
92
|
+
|
93
|
+
@media screen and (min-width: 769px) {
|
94
|
+
|
95
|
+
.nav ul {
|
96
|
+
|
97
|
+
width: 100%;
|
98
|
+
|
99
|
+
display: flex;
|
100
|
+
|
101
|
+
justify-content: space-between;
|
102
|
+
|
103
|
+
padding-bottom: 20px; } }
|
104
|
+
|
105
|
+
@media screen and (max-width: 768px) {
|
106
|
+
|
107
|
+
.nav li {
|
108
|
+
|
109
|
+
border-bottom: 1px solid #ab987a; } }
|
110
|
+
|
111
|
+
@media screen and (min-width: 769px) {
|
112
|
+
|
113
|
+
.nav li {
|
114
|
+
|
115
|
+
text-align: center;
|
116
|
+
|
117
|
+
padding: 0.5em 1.75em;
|
118
|
+
|
119
|
+
display: flex; }
|
120
|
+
|
121
|
+
.nav li:not(:last-of-type) {
|
122
|
+
|
123
|
+
border-right: 1px solid #ab987a; } }
|
124
|
+
|
125
|
+
@media screen and (min-width: 769px) {
|
126
|
+
|
127
|
+
.nav li:first-of-type {
|
128
|
+
|
129
|
+
padding-left: 0; } }
|
130
|
+
|
131
|
+
@media screen and (min-width: 769px) {
|
132
|
+
|
133
|
+
.nav li:last-of-type {
|
134
|
+
|
135
|
+
padding-right: 0; } }
|
136
|
+
|
137
|
+
.nav li a {
|
138
|
+
|
139
|
+
display: block;
|
140
|
+
|
141
|
+
color: #350c03;
|
142
|
+
|
143
|
+
position: relative; }
|
144
|
+
|
145
|
+
@media screen and (max-width: 768px) {
|
146
|
+
|
147
|
+
.nav li a {
|
148
|
+
|
149
|
+
padding: 0.8em 0; } }
|
150
|
+
|
151
|
+
@media screen and (min-width: 769px) {
|
152
|
+
|
153
|
+
.nav li a:before {
|
154
|
+
|
155
|
+
position: absolute;
|
156
|
+
|
157
|
+
left: 0;
|
158
|
+
|
159
|
+
bottom: -1em;
|
160
|
+
|
161
|
+
transition: background-color 0.3s;
|
162
|
+
|
163
|
+
-webkit-transition: background-color 0.3s; }
|
164
|
+
|
165
|
+
.nav li a:hover {
|
166
|
+
|
167
|
+
color: #ff533d; }
|
168
|
+
|
169
|
+
.nav li a:hover:before {
|
170
|
+
|
171
|
+
content: '';
|
172
|
+
|
173
|
+
background-color: #ff533d;
|
174
|
+
|
175
|
+
position: absolute;
|
176
|
+
|
177
|
+
left: 0;
|
178
|
+
|
179
|
+
bottom: -1em;
|
180
|
+
|
181
|
+
width: 100%;
|
182
|
+
|
183
|
+
height: 2px;
|
184
|
+
|
185
|
+
animation: bgChange 0.3s;
|
186
|
+
|
187
|
+
-webkit-animation: bgChange 0.3s; } }
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
.navBtn {
|
192
|
+
|
193
|
+
cursor: pointer;
|
194
|
+
|
195
|
+
z-index: 999;
|
196
|
+
|
197
|
+
position: absolute;
|
198
|
+
|
199
|
+
top: 50%;
|
200
|
+
|
201
|
+
-webkit-transform: translateY(-50%);
|
202
|
+
|
203
|
+
-ms-transform: translateY(-50%);
|
204
|
+
|
205
|
+
transform: translateY(-50%);
|
206
|
+
|
207
|
+
right: 6px; }
|
208
|
+
|
209
|
+
.navBtn__inner {
|
210
|
+
|
211
|
+
position: relative;
|
212
|
+
|
213
|
+
display: block;
|
214
|
+
|
215
|
+
width: 42px;
|
216
|
+
|
217
|
+
height: 42px;
|
218
|
+
|
219
|
+
background: transparent;
|
220
|
+
|
221
|
+
text-align: center; }
|
222
|
+
|
223
|
+
.navBtn span {
|
224
|
+
|
225
|
+
display: block;
|
226
|
+
|
227
|
+
position: absolute;
|
228
|
+
|
229
|
+
width: 30px;
|
230
|
+
|
231
|
+
border-bottom: solid 3px #ff533d;
|
232
|
+
|
233
|
+
-webkit-transition: 0.35s ease-in-out;
|
234
|
+
|
235
|
+
-moz-transition: 0.35s ease-in-out;
|
236
|
+
|
237
|
+
transition: 0.35s ease-in-out;
|
238
|
+
|
239
|
+
left: 6px; }
|
240
|
+
|
241
|
+
.navBtn span:nth-of-type(1) {
|
242
|
+
|
243
|
+
top: 9px; }
|
244
|
+
|
245
|
+
.navBtn span:nth-of-type(2) {
|
246
|
+
|
247
|
+
top: 18px; }
|
248
|
+
|
249
|
+
.navBtn span:nth-of-type(3) {
|
250
|
+
|
251
|
+
top: 27px; }
|
252
|
+
|
253
|
+
.navBtn.active span:nth-of-type(1) {
|
254
|
+
|
255
|
+
transform: rotate(-45deg);
|
256
|
+
|
257
|
+
-webkit-transform: rotate(-45deg);
|
258
|
+
|
259
|
+
top: 18px; }
|
260
|
+
|
261
|
+
.navBtn.active span:nth-of-type(2) {
|
262
|
+
|
263
|
+
display: none; }
|
264
|
+
|
265
|
+
.navBtn.active span:nth-of-type(3) {
|
266
|
+
|
267
|
+
transform: rotate(45deg);
|
268
|
+
|
269
|
+
-webkit-transform: rotate(45deg);
|
270
|
+
|
271
|
+
top: 18px; }
|
272
|
+
|
273
|
+
```
|
274
|
+
|
275
|
+
|
276
|
+
|
41
277
|
```
|
42
278
|
|
43
279
|
function spMenu() {
|
@@ -138,6 +374,12 @@
|
|
138
374
|
|
139
375
|
```
|
140
376
|
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
141
383
|
### 試したこと
|
142
384
|
|
143
385
|
|
1
コードをメークダウン箇所に変更致しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
<ul>
|
20
20
|
|
21
|
-
<li><a href="/#merit">
|
21
|
+
<li><a href="/#merit">HOME</a></li>
|
22
22
|
|
23
23
|
<li><a href="/#menu">メニュー</a></li>
|
24
24
|
|
@@ -38,11 +38,7 @@
|
|
38
38
|
|
39
39
|
```
|
40
40
|
|
41
|
-
|
42
|
-
|
43
|
-
|
41
|
+
```
|
44
|
-
|
45
|
-
|
46
42
|
|
47
43
|
function spMenu() {
|
48
44
|
|
@@ -140,6 +136,14 @@
|
|
140
136
|
|
141
137
|
}
|
142
138
|
|
139
|
+
```
|
140
|
+
|
141
|
+
### 試したこと
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
143
147
|
|
144
148
|
|
145
149
|
### 補足情報(FW/ツールのバージョンなど)
|