" Radio Input Image Checkbox"
Bootstrap 4.1.1 Snippet by sumi9xm

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<div class="row">
<ul>
<li><input type="radio" id="cb1" name="aw" />
<label for="cb1"><img src="http://lorempixel.com/100/100" /></label>
</li>
<li><input type="radio" id="cb2" name="aw" />
<label for="cb2"><img src="http://lorempixel.com/101/101" /></label>
</li>
<li><input type="radio" id="cb4" name="aw" />
<label for="cb4"><img src="http://lorempixel.com/103/103" /></label>
</li>
</ul>
</div>
</div>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
ul {
list-style-type: none;
}
li {
display: inline-block;
}
input[type="radio"][id^="cb"] {
display: none;
}
label {
border: 1px solid #fff;
padding: 10px;
border-radius: 50%;
display: block;
position: relative;
margin: 10px;
cursor: pointer;
}
label:before {
background-color: rgba(16, 65, 99, 0.32 );
text-align:center;
color: white;
content: " ";
display: block;
border-radius: 50%;
/* border: 1px solid grey; */
position: absolute;
top:10px;
left: 10px;
z-index:1;
width: 100px;
height: 100px;
text-align: center;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: