質問編集履歴
4
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -351,3 +351,131 @@
|
|
351
351
|
}
|
352
352
|
|
353
353
|
```
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
【追記】
|
358
|
+
|
359
|
+
上手く行きました!
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
```HTML
|
364
|
+
|
365
|
+
<!DOCTYPE html>
|
366
|
+
|
367
|
+
<html lang="ja">
|
368
|
+
|
369
|
+
<head>
|
370
|
+
|
371
|
+
<meta charset="UTF-8">
|
372
|
+
|
373
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
374
|
+
|
375
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
376
|
+
|
377
|
+
<title>ToDoリスト</title>
|
378
|
+
|
379
|
+
<link rel="stylesheet" href="css/styles.css">
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
</head>
|
384
|
+
|
385
|
+
<body>
|
386
|
+
|
387
|
+
<h1>ToDoリスト</h1>
|
388
|
+
|
389
|
+
|
390
|
+
|
391
|
+
<div class="radiobutton">
|
392
|
+
|
393
|
+
<input type="radio" id="button-1" name="radio1" value="1" checked />
|
394
|
+
|
395
|
+
<label for="button-1">すべて</label>
|
396
|
+
|
397
|
+
<input type="radio" id="button-2" name="radio1" value="2" />
|
398
|
+
|
399
|
+
<label for="button-2">完了中</label>
|
400
|
+
|
401
|
+
<input type="radio" id="button-3" name="radio1" value="3" />
|
402
|
+
|
403
|
+
<label for="button-3">作業中</label>
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
|
411
|
+
<h3 id="id_h3">ID コメント 状態</h3>
|
412
|
+
|
413
|
+
<h2>新規タスクの追加</h2>
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
<p id=id_p>
|
420
|
+
|
421
|
+
<input type="text" id="id_text" value="">
|
422
|
+
|
423
|
+
<button id="btn" type="btn" class="button"> 追加</button>
|
424
|
+
|
425
|
+
</p>
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
<script>
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
const btn = document.getElementById('btn');
|
434
|
+
|
435
|
+
btn.addEventListener('click', () => {
|
436
|
+
|
437
|
+
const text = document.getElementById('id_text').value;
|
438
|
+
|
439
|
+
const p1 = document.getElementById('id_p');
|
440
|
+
|
441
|
+
const p2 = document.getElementById('id_p');
|
442
|
+
|
443
|
+
const h2 = document.getElementById('id_h2');
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
//const button = <button id="btn" type="btn" class="button"> 作業中</button>
|
448
|
+
|
449
|
+
//const button = document.createElement('btn');
|
450
|
+
|
451
|
+
//btn.textContent = '作業中';
|
452
|
+
|
453
|
+
//document.body.appendChild(button);
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
p1.innerHTML("作業中");
|
458
|
+
|
459
|
+
p2.innerHTML("削除");
|
460
|
+
|
461
|
+
document.body.insertBefore(document.createTextNode(text), h2);
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
});
|
466
|
+
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
|
473
|
+
</script>
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
</body>
|
478
|
+
|
479
|
+
</html>
|
480
|
+
|
481
|
+
```
|
3
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -173,3 +173,181 @@
|
|
173
173
|
}
|
174
174
|
|
175
175
|
```
|
176
|
+
|
177
|
+
7
|
178
|
+
|
179
|
+
【追記】
|
180
|
+
|
181
|
+
リンク「<script src="https://unpkg.com/ionicons@4.5.10-0/dist/ionicons.js"></script>」をHTMLを挿入することで、ボタンはうまく反映されました。
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
サンプル通りのラジオボタンのコードはどのように検索すれば見つかるモノなのでしょうか?
|
186
|
+
|
187
|
+
検索は書けたのですが、見つからず途方に暮れています。
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
```HTML
|
192
|
+
|
193
|
+
<!DOCTYPE html>
|
194
|
+
|
195
|
+
<html lang="ja">
|
196
|
+
|
197
|
+
<head>
|
198
|
+
|
199
|
+
<meta charset="UTF-8">
|
200
|
+
|
201
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
202
|
+
|
203
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
204
|
+
|
205
|
+
<title>ToDoリスト</title>
|
206
|
+
|
207
|
+
<link rel="stylesheet" href="css/styles.css">
|
208
|
+
|
209
|
+
<link href="https://unpkg.com/ionicons@4.5.10-0/dist/css/ionicons.min.css" rel="stylesheet">
|
210
|
+
|
211
|
+
</head>
|
212
|
+
|
213
|
+
<body>
|
214
|
+
|
215
|
+
<h1>ToDoリスト</h1>
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
<label>
|
220
|
+
|
221
|
+
<input type="radio" name="radio" class="radio" />
|
222
|
+
|
223
|
+
<span class="radio-icon"></span>
|
224
|
+
|
225
|
+
すべて
|
226
|
+
|
227
|
+
</label>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
<label>
|
232
|
+
|
233
|
+
<input type="radio" name="radio" class="radio" />
|
234
|
+
|
235
|
+
<span class="radio-icon"></span>
|
236
|
+
|
237
|
+
作業中
|
238
|
+
|
239
|
+
</label>
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
<label>
|
244
|
+
|
245
|
+
<input type="radio" name="radio" class="radio" />
|
246
|
+
|
247
|
+
<span class="radio-icon"></span>
|
248
|
+
|
249
|
+
完了中
|
250
|
+
|
251
|
+
</label>
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
<h3 id="id_h3">IDコメント 状態</h3>
|
256
|
+
|
257
|
+
<h2>新規タスクの追加</h2>
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
<p>
|
262
|
+
|
263
|
+
<input type="text" id="id_text" value="">
|
264
|
+
|
265
|
+
<button id="btn" type="btn" class="button"> 追加</button>
|
266
|
+
|
267
|
+
</p>
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
<script>
|
274
|
+
|
275
|
+
const btn = document.getElementById('btn');
|
276
|
+
|
277
|
+
btn.addEventListener('click', () => {
|
278
|
+
|
279
|
+
const text = document.getElementById('id_text').value;
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
const h2 = document.getElementById('id_h2');
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
document.body.insertBefore(document.createTextNode(text), h2);
|
288
|
+
|
289
|
+
});
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
</script>
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
</body>
|
298
|
+
|
299
|
+
</html>
|
300
|
+
|
301
|
+
```
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
```CSS
|
308
|
+
|
309
|
+
.button:hover {
|
310
|
+
|
311
|
+
background-color: #59b1eb;
|
312
|
+
|
313
|
+
}
|
314
|
+
|
315
|
+
.button:active {
|
316
|
+
|
317
|
+
top: 3px;
|
318
|
+
|
319
|
+
box-shadow: none;
|
320
|
+
|
321
|
+
}
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
.radio {
|
328
|
+
|
329
|
+
display: none;
|
330
|
+
|
331
|
+
}
|
332
|
+
|
333
|
+
.radio + .radio-icon:before {
|
334
|
+
|
335
|
+
content: "\f3a6";
|
336
|
+
|
337
|
+
font-family: "Ionicons";
|
338
|
+
|
339
|
+
color: #ccc;
|
340
|
+
|
341
|
+
font-size: 22px;
|
342
|
+
|
343
|
+
}
|
344
|
+
|
345
|
+
.radio:checked + .radio-icon:before {
|
346
|
+
|
347
|
+
content: "\f3a7";
|
348
|
+
|
349
|
+
color: #17bcdf;
|
350
|
+
|
351
|
+
}
|
352
|
+
|
353
|
+
```
|
2
誤字
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ボタンの設置が上手くいきません。
|
1
|
+
尹ボタンの設置が上手くいきません。
|
test
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
![イメージ説明](a0fb1da35f59ff47b32a4c94807f134a.png)
|
4
4
|
|
5
|
-
https://gyazo.com/d2c1c87a05c786e2ded8873d13fd0a0d
|
5
|
+
[サンプル](https://gyazo.com/d2c1c87a05c786e2ded8873d13fd0a0d)
|
6
6
|
|
7
7
|
|
8
8
|
|
1
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
ラジオボタンを以下の形にしたいのですが、上手く設定できません。
|
2
2
|
|
3
3
|
![イメージ説明](a0fb1da35f59ff47b32a4c94807f134a.png)
|
4
|
+
|
5
|
+
https://gyazo.com/d2c1c87a05c786e2ded8873d13fd0a0d
|
4
6
|
|
5
7
|
|
6
8
|
|