質問編集履歴
2
CSS記述
test
CHANGED
File without changes
|
test
CHANGED
@@ -76,9 +76,265 @@
|
|
76
76
|
|
77
77
|
【CSS】
|
78
78
|
|
79
|
+
```
|
80
|
+
|
81
|
+
* {
|
82
|
+
|
83
|
+
margin: 0;
|
84
|
+
|
85
|
+
padding: 0;
|
86
|
+
|
87
|
+
-webkit-box-sizing: border-box;
|
88
|
+
|
79
|
-
|
89
|
+
-moz-box-sizing: border-box;
|
90
|
+
|
80
|
-
|
91
|
+
box-sizing: border-box;
|
92
|
+
|
93
|
+
}
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
body {
|
98
|
+
|
99
|
+
background: #2d2c41;
|
100
|
+
|
81
|
-
|
101
|
+
font-family: 'Open Sans', Arial, Helvetica, Sans-serif, Verdana, Tahoma;
|
102
|
+
|
103
|
+
}
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
ul {
|
108
|
+
|
109
|
+
list-style-type: none;
|
110
|
+
|
111
|
+
}
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
a {
|
116
|
+
|
117
|
+
color: #b63b4d;
|
118
|
+
|
119
|
+
text-decoration: none;
|
120
|
+
|
121
|
+
}
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
/** =======================
|
126
|
+
|
127
|
+
* Contenedor Principal
|
128
|
+
|
129
|
+
===========================*/
|
130
|
+
|
131
|
+
h1 {
|
132
|
+
|
133
|
+
color: #FFF;
|
134
|
+
|
135
|
+
font-size: 24px;
|
136
|
+
|
137
|
+
font-weight: 400;
|
138
|
+
|
139
|
+
text-align: center;
|
140
|
+
|
141
|
+
margin-top: 80px;
|
142
|
+
|
143
|
+
}
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
h1 a {
|
148
|
+
|
149
|
+
color: #c12c42;
|
150
|
+
|
151
|
+
font-size: 16px;
|
152
|
+
|
153
|
+
}
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
.accordion {
|
158
|
+
|
159
|
+
width: 100%;
|
160
|
+
|
161
|
+
max-width: 360px;
|
162
|
+
|
163
|
+
margin: 30px auto 20px;
|
164
|
+
|
165
|
+
background: #FFF;
|
166
|
+
|
167
|
+
-webkit-border-radius: 4px;
|
168
|
+
|
169
|
+
-moz-border-radius: 4px;
|
170
|
+
|
171
|
+
border-radius: 4px;
|
172
|
+
|
173
|
+
}
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
.accordion .link {
|
178
|
+
|
179
|
+
cursor: pointer;
|
180
|
+
|
181
|
+
display: block;
|
182
|
+
|
183
|
+
padding: 15px 15px 15px 42px;
|
184
|
+
|
185
|
+
color: #4D4D4D;
|
186
|
+
|
187
|
+
font-size: 14px;
|
188
|
+
|
189
|
+
font-weight: 700;
|
190
|
+
|
191
|
+
border-bottom: 1px solid #CCC;
|
192
|
+
|
193
|
+
position: relative;
|
194
|
+
|
195
|
+
-webkit-transition: all 0.4s ease;
|
196
|
+
|
197
|
+
-o-transition: all 0.4s ease;
|
198
|
+
|
199
|
+
transition: all 0.4s ease;
|
200
|
+
|
201
|
+
}
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
.accordion li:last-child .link {
|
206
|
+
|
207
|
+
border-bottom: 0;
|
208
|
+
|
209
|
+
}
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
.accordion li i {
|
214
|
+
|
215
|
+
position: absolute;
|
216
|
+
|
217
|
+
top: 16px;
|
218
|
+
|
219
|
+
left: 12px;
|
220
|
+
|
221
|
+
font-size: 18px;
|
222
|
+
|
223
|
+
color: #595959;
|
224
|
+
|
225
|
+
-webkit-transition: all 0.4s ease;
|
226
|
+
|
227
|
+
-o-transition: all 0.4s ease;
|
228
|
+
|
229
|
+
transition: all 0.4s ease;
|
230
|
+
|
231
|
+
}
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
.accordion li i.fa-chevron-down {
|
236
|
+
|
237
|
+
right: 12px;
|
238
|
+
|
239
|
+
left: auto;
|
240
|
+
|
241
|
+
font-size: 16px;
|
242
|
+
|
243
|
+
}
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
.accordion li.open .link {
|
248
|
+
|
249
|
+
color: #b63b4d;
|
250
|
+
|
251
|
+
}
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
.accordion li.open i {
|
256
|
+
|
257
|
+
color: #b63b4d;
|
258
|
+
|
259
|
+
}
|
260
|
+
|
261
|
+
.accordion li.open i.fa-chevron-down {
|
262
|
+
|
263
|
+
-webkit-transform: rotate(180deg);
|
264
|
+
|
265
|
+
-ms-transform: rotate(180deg);
|
266
|
+
|
267
|
+
-o-transform: rotate(180deg);
|
268
|
+
|
269
|
+
transform: rotate(180deg);
|
270
|
+
|
271
|
+
}
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
.accordion li.default .submenu {display: block;}
|
276
|
+
|
277
|
+
/**
|
278
|
+
|
279
|
+
* Submenu
|
280
|
+
|
281
|
+
-----------------------------*/
|
282
|
+
|
283
|
+
.submenu {
|
284
|
+
|
285
|
+
display: none;
|
286
|
+
|
287
|
+
background: #444359;
|
288
|
+
|
289
|
+
font-size: 14px;
|
290
|
+
|
291
|
+
}
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
.submenu li {
|
296
|
+
|
297
|
+
border-bottom: 1px solid #4b4a5e;
|
298
|
+
|
299
|
+
}
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
.submenu a {
|
304
|
+
|
305
|
+
display: block;
|
306
|
+
|
307
|
+
text-decoration: none;
|
308
|
+
|
309
|
+
color: #d9d9d9;
|
310
|
+
|
311
|
+
padding: 12px;
|
312
|
+
|
313
|
+
padding-left: 42px;
|
314
|
+
|
315
|
+
-webkit-transition: all 0.25s ease;
|
316
|
+
|
317
|
+
-o-transition: all 0.25s ease;
|
318
|
+
|
319
|
+
transition: all 0.25s ease;
|
320
|
+
|
321
|
+
}
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
.submenu a:hover {
|
326
|
+
|
327
|
+
background: #b63b4d;
|
328
|
+
|
329
|
+
color: #FFF;
|
330
|
+
|
331
|
+
}
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
```
|
82
338
|
|
83
339
|
-------------------------------------------------------------------------------------------
|
84
340
|
|
1
タイトルの変更と<code>を記述
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
アコーディオン
|
1
|
+
アコーディオンメニューのリンク先でクリックしたメニューを開いたままにしたい
|
test
CHANGED
@@ -24,11 +24,9 @@
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
-
|
27
|
+
【HTML】※HTMLコードは長いの一部省略します
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
```
|
32
30
|
|
33
31
|
<html>
|
34
32
|
|
@@ -72,7 +70,7 @@
|
|
72
70
|
|
73
71
|
</html>
|
74
72
|
|
75
|
-
|
73
|
+
```
|
76
74
|
|
77
75
|
|
78
76
|
|
@@ -87,6 +85,8 @@
|
|
87
85
|
|
88
86
|
|
89
87
|
【JS】
|
88
|
+
|
89
|
+
```
|
90
90
|
|
91
91
|
$(function() {
|
92
92
|
|
@@ -138,4 +138,6 @@
|
|
138
138
|
|
139
139
|
var accordion = new Accordion($('#accordion'), false);
|
140
140
|
|
141
|
-
});
|
141
|
+
});
|
142
|
+
|
143
|
+
```
|