回答編集履歴
1
test
CHANGED
@@ -15,3 +15,27 @@
|
|
15
15
|
</label>
|
16
16
|
</div>
|
17
17
|
```
|
18
|
+
# 修正
|
19
|
+
誤解していました画像ではなく枠につけたいのでしたね
|
20
|
+
```css
|
21
|
+
<style>
|
22
|
+
.image_box label{
|
23
|
+
background-Color:yellow;
|
24
|
+
display:block;
|
25
|
+
width:200px;
|
26
|
+
height:200px;
|
27
|
+
}
|
28
|
+
.disabled_checkbox{
|
29
|
+
display:none;
|
30
|
+
}
|
31
|
+
#img1:checked ~ * [for=img1] {
|
32
|
+
border:solid 2px red;
|
33
|
+
}
|
34
|
+
</style>
|
35
|
+
<input class="disabled_checkbox" type="checkbox" id="img1" checked />
|
36
|
+
<div class="image_box">
|
37
|
+
<label for="img1">
|
38
|
+
<img class="thumbnail" src="1.jpg" alt="">
|
39
|
+
</label>
|
40
|
+
</div>
|
41
|
+
```
|