質問編集履歴
4
htmlコードの修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -21,7 +21,7 @@
|
|
21
21
|
```html
|
22
22
|
<div class="tab-wrap">
|
23
23
|
|
24
|
-
<input id="TAB-01" type="radio" name="TAB" class="tab-switch">
|
24
|
+
<input id="TAB-01" type="radio" name="TAB" class="tab-switch" checked>
|
25
25
|
<label class="tab-label" for="TAB-01">タブA</label>
|
26
26
|
<div class="tab-content">
|
27
27
|
<form method="post">
|
3
CSSの追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -37,4 +37,30 @@
|
|
37
37
|
</div>
|
38
38
|
|
39
39
|
</div>
|
40
|
+
```
|
41
|
+
|
42
|
+
```css
|
43
|
+
.tab-switch {
|
44
|
+
display: none;
|
45
|
+
}
|
46
|
+
.tab-wrap {
|
47
|
+
display: flex;
|
48
|
+
flex-wrap: wrap;
|
49
|
+
}
|
50
|
+
.tab-label {
|
51
|
+
order: -1;
|
52
|
+
position: relative;
|
53
|
+
z-index: 1;
|
54
|
+
}
|
55
|
+
.tab-content {
|
56
|
+
width: 100%;
|
57
|
+
height: 0;
|
58
|
+
overflow: hidden;
|
59
|
+
opacity: 0;
|
60
|
+
}
|
61
|
+
.tab-switch:checked+.tab-label+.tab-content {
|
62
|
+
height: auto;
|
63
|
+
overflow: auto;
|
64
|
+
opacity: 1;
|
65
|
+
}
|
40
66
|
```
|
2
タイトルの変更
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
リロード後もタブを維持する
|
1
|
+
リロード後もタブを維持する方法
|
body
CHANGED
File without changes
|
1
コードの誤記を修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -29,7 +29,7 @@
|
|
29
29
|
</form>
|
30
30
|
</div>
|
31
31
|
<input id="TAB-02" type="radio" name="TAB" class="tab-switch">
|
32
|
-
<label class="tab-label" for="TAB-
|
32
|
+
<label class="tab-label" for="TAB-02">タブB</label>
|
33
33
|
<div class="tab-content">
|
34
34
|
<form method="post">
|
35
35
|
<input type='submit' name='' value=''>
|