PASSO 1
Copie e cole este código CSS antes de </ head >
<style type="text/css">
.toggry {
position: relative; width: 140px;
-webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
}
.toggry-checkbox {
display: none;
}
.toggry-label {
display: block; overflow: hidden; cursor: pointer;
border: 2px solid #CCCCCC; border-radius: 10px;
}
.toggry-inner {
display: block; width: 200%; margin-left: -100%;
-moz-transition: margin 0.3s ease-in 0s; -webkit-transition: margin 0.3s ease-in 0s;
-o-transition: margin 0.3s ease-in 0s; transition: margin 0.3s ease-in 0s;
}
.toggry-inner:before, .toggry-inner:after {
display: block; float: left; width: 50%; height: 32px; padding: 0; line-height: 32px;
font-size: 15px; color: white;
-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}
.toggry-inner:before {
content: "MASCULINO";
padding-left: 10px;
background-color: #73C0C0; color: #FFFFFF;
}
.toggry-inner:after {
content: "FEMININO";
padding-right: 10px;
background-color: #73C0C0; color: #FFFFFF;
text-align: right;
}
.toggry-switch {
display: block; width: 18px; margin: 6px;
background: #FFFFFF;
border: 2px solid #CCCCCC; border-radius: 5px;
position: absolute; top: 0; bottom: 0; right: 106px;
-moz-transition: all 0.3s ease-in 0s; -webkit-transition: all 0.3s ease-in 0s;
-o-transition: all 0.3s ease-in 0s; transition: all 0.3s ease-in 0s;
}
.toggry-checkbox:checked + .toggry-label .toggry-inner {
margin-left: 0;
}
.toggry-checkbox:checked + .toggry-label .toggry-switch {
right: 0px;
}
</style>
PASSO 2
Copie e cole esta porção de código dentro da página.
<div class="toggry" style="text-align: left; display: inline-block;">
<input type="checkbox" name="toggry" class="toggry-checkbox" id="mytoggryA" checked>
<label class="toggry-label" for="mytoggryA">
<span class="toggry-inner"></span>
<span class="toggry-switch"></span>
</label>
</div>
DICA: Customizar assuntos .toggry-inner:before { e .toggry-inner:after - para tamanho .toggry { - para alinhamento do botão de movimento toggry-switch { - para aumentar a curva dos cantos do botão border-radius