"TEST: Checkbox/Radio - CSS Only"
Bootstrap 3.3.0 Snippet by mrmccormack

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
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.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="container">
<h1 class="text-center">Checkbox/Radio - CSS Only</h1>
</div>
<div class="container">
<div class="well well-sm text-center">
<h3>Radio</h3>
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-default active">
<input type="radio" name="options" id="option2" autocomplete="off" chacked>
<span class="glyphicon glyphicon-ok"></span><img src="https://cdn3.iconfinder.com/data/icons/rcons-user-action/32/girl-48.png" alt="">
</label>
<label class="btn btn-defatul">
<input type="radio" name="options" id="option1" autocomplete="off">
<span class="glyphicon glyphicon-ok"></span><img src="https://cdn0.iconfinder.com/data/icons/small-n-flat/24/678099-profile-filled-48.png" alt="">
</label>
<label class="btn btn-info">
<input type="radio" name="options" id="option2" autocomplete="off">
<span class="glyphicon glyphicon-ok"></span>
</label>
<label class="btn btn-default">
<input type="radio" name="options" id="option2" autocomplete="off">
<span class="glyphicon glyphicon-ok"></span>
</label>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
.btn span.glyphicon {
opacity: 0;
padding: 18px;
}
.btn.active span.glyphicon {
opacity: 1;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: