"Fancy radio button"
Bootstrap 4.0.0 Snippet by vicky04666

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="">
<label><input type="radio" class="radio-inline" name="radios" value=""><span class="outside"><span class="inside"></span></span>Neopolitan</label>
<label><input type="radio"class="radio-inline" name="radios" value=""><span class="outside"><span class="inside"></span></span>Mint Choco Chip</label>
<label><input type="radio" class="radio-inline" name="radios" value=""><span class="outside"><span class="inside"></span></span>Blue Moon</label>
<label><input type="radio" class="radio-inline" name="radios" value=""><span class="outside"><span class="inside"></span></span>All the Ice Cream</label>
</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
label {
margin: 2em;
display: inline-block;
position: relative;
padding-left: 40px;
cursor: pointer;
}
input {
height: 1px;
width: 1px;
opacity: 0;
}
.outside {
display: inline-block;
position: absolute;
left: 0;
top: 50%;
margin-top: -10px;
width: 20px;
height: 20px;
border: 2px solid red;
border-radius: 50%;
-webkit-box-sizing: border-box;
box-sizing: border-box;
background: none;
}
.inside {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
display: inline-block;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: