"Animated Radio tab"
Bootstrap 4.1.1 Snippet by maridlcrmn

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<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 wrapper">
<div class="row">
<div class="col-lg-8 offset-lg-1 form-group">
<div class="input-group toggle_radio">
<input type="radio" checked class="toggle_option" id="first_toggle" name="toggle_option">
<input type="radio" class="toggle_option" id="second_toggle" name="toggle_option">
<label for="first_toggle"><img src="http://icons-for-free.com/free-icons/png/512/2754579.png" class="mb-2" width="200"><h3>Soy Independiente</h3></label>
<label for="second_toggle"><img src="https://cdn0.iconfinder.com/data/icons/business-381/500/business-work_11-512.png" class="mb-2" width="200"><h3>Soy Empresa</h3></label>
<div class="toggle_option_slider shadow">
</div>
</div>
</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
.wrapper{
padding-top:100px;
padding-bottom: 100px;
}
.toggle_radio{
background: rgba(255, 193, 10, 0.6);
border-radius: 6px;
padding: 30px 0!important;
position: relative;
width: 100%;
}
.toggle_radio > * {
float: left;
}
.toggle_radio input[type=radio]{
display: none;
}
.toggle_radio label{
color: #333;
display: block;
width: 50%;
cursor: pointer;
text-align: center;
margin-bottom: 0;
z-index: 1;
}
.toggle_option_slider{
width: 50%;
border-radius: 6px;
position: absolute;
top: 0;
bottom: 0;
z-index: 0;
-webkit-transition: all 400ms ease-out 200ms;
transition: all 400ms ease-out 200ms;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments:

Gracias. Me estaba complicando la vida con esto :)

rafaelezco () - 6 years ago - Reply 0