質問編集履歴
1
画像以外のコードの記載
title
CHANGED
File without changes
|
body
CHANGED
@@ -15,7 +15,111 @@
|
|
15
15
|
|
16
16
|
```HTML
|
17
17
|
補足情報の画像1枚目参照。
|
18
|
+
<!-- サイト -->
|
19
|
+
<div class="tab-wrap">
|
20
|
+
<input id="TAB-01" type="radio" name="TAB" class="tab-switch" checked="checked">
|
21
|
+
<label class="tab-label" for="TAB-01">Sites</label>
|
22
|
+
<div class="tab-content">
|
23
|
+
<figure class="img-area" id="olu">
|
24
|
+
<a href="https://portfolio.abs-weblabo.jp/" class="sites-img">
|
25
|
+
<img src="https://abs-weblabo.jp/wp-content/uploads/2021/02/portfolio.png" class="sites-img" id="olu" alt="">
|
26
|
+
</a>
|
27
|
+
</figure>
|
28
|
+
<figure class="img-area" id="nora">
|
29
|
+
<a href="https://portfolio2.abs-weblabo.jp/" class="sites-img">
|
30
|
+
<img src="https://abs-weblabo.jp/wp-content/uploads/2021/02/portfolio2.png" alt="" id="nora" class="sites-img">
|
31
|
+
</a>
|
32
|
+
</figure>
|
33
|
+
<figure class="img-area" id="olu1">
|
34
|
+
<a href="https://portfolio1.abs-weblabo.jp/" class="sites-img">
|
35
|
+
<img src="https://abs-weblabo.jp/wp-content/uploads/2021/05/portfolio1.png" class="sites-img" id="olu1" alt="">
|
36
|
+
</a>
|
37
|
+
</figure>
|
38
|
+
<a href="https://portfolio1.abs-weblabo.jp/">
|
39
|
+
</a>
|
40
|
+
</div>
|
41
|
+
<!-- その他 -->
|
42
|
+
<input id="TAB-02" type="radio" name="TAB" class="tab-switch">
|
43
|
+
<label class="tab-label" for="TAB-02">Others</label>
|
44
|
+
<div class="tab-content">
|
45
|
+
<figure>
|
46
|
+
<a href="https://portfolio.abs-weblabo.jp/">
|
47
|
+
<img src="https://abs-weblabo.jp/wp-content/uploads/2021/02/名刺2.png" class="others-img" alt="">
|
48
|
+
</a>
|
49
|
+
</figure>
|
50
|
+
<figure>
|
51
|
+
<a href="https://portfolio.abs-weblabo.jp/">
|
52
|
+
<img src="https://abs-weblabo.jp/wp-content/uploads/2021/02/名刺1.png" class="others-img" alt="">
|
53
|
+
</a>
|
54
|
+
</figure>
|
55
|
+
</div>
|
56
|
+
</div>
|
18
57
|
```
|
58
|
+
```CSS
|
59
|
+
補足情報の画像1枚目参照。
|
60
|
+
/*ボタンタブのデザイン*/
|
61
|
+
.tab-wrap {
|
62
|
+
display: flex;
|
63
|
+
flex-wrap: wrap;
|
64
|
+
margin:20px 0;
|
65
|
+
}
|
66
|
+
.tab-wrap:after {
|
67
|
+
content: '';
|
68
|
+
width: 100%;
|
69
|
+
height: 3px;
|
70
|
+
background: #0343A0;
|
71
|
+
display: block;
|
72
|
+
order: -1;
|
73
|
+
}
|
74
|
+
.tab-label {
|
75
|
+
color: White;
|
76
|
+
background: LightSkyblue;
|
77
|
+
font-weight: bold;
|
78
|
+
text-shadow: 0 -1px 0 rgba(0,0,0,.2);
|
79
|
+
white-space: nowrap;
|
80
|
+
text-align: center;
|
81
|
+
padding: 10px .5em;
|
82
|
+
order: -1;
|
83
|
+
position: relative;
|
84
|
+
z-index: 1;
|
85
|
+
cursor: pointer;
|
86
|
+
border-radius: 5px 5px 0 0;
|
87
|
+
flex: 2;
|
88
|
+
}
|
89
|
+
.tab-label:not(:last-of-type) {
|
90
|
+
margin-right: 5px;
|
91
|
+
}
|
92
|
+
.sites-img{
|
93
|
+
/*width:65%;*/
|
94
|
+
height:auto;
|
95
|
+
}
|
96
|
+
.others-img{
|
97
|
+
/*width:65%;*/
|
98
|
+
height:auto;
|
99
|
+
}
|
100
|
+
.img-area{
|
101
|
+
vertical-align: bottom;
|
102
|
+
}
|
103
|
+
/* アクティブなタブ */
|
104
|
+
.tab-content{
|
105
|
+
height: 0;
|
106
|
+
overflow: hidden;
|
107
|
+
opacity: 1;
|
108
|
+
display: grid;
|
109
|
+
gap:20px;
|
110
|
+
grid-template-columns: 1fr 1fr;
|
111
|
+
}
|
112
|
+
.tab-switch:checked+.tab-label {
|
113
|
+
background: #0343A0;
|
114
|
+
}
|
115
|
+
.tab-switch:checked+.tab-label+.tab-content {
|
116
|
+
height: auto;
|
117
|
+
overflow: auto;
|
118
|
+
opacity: 1;
|
119
|
+
transition: 1.0s opacity;
|
120
|
+
box-shadow: 0 0 3px rgba(0,0,0,.2);
|
121
|
+
}
|
122
|
+
```
|
19
123
|
|
20
124
|
### 試したこと
|
21
125
|
|