mirror of
https://github.com/uiverse-io/galaxy.git
synced 2025-11-28 05:00:22 +08:00
79 lines
1.8 KiB
HTML
79 lines
1.8 KiB
HTML
<div class="switch-holder">
|
|
<div class="switch-label">
|
|
<i class="fa fa-bluetooth-b"></i><span>Bluetooth</span>
|
|
</div>
|
|
<div class="switch-toggle">
|
|
<input type="checkbox" id="bluetooth">
|
|
<label for="bluetooth"></label>
|
|
</div>
|
|
</div>
|
|
<style>
|
|
/* From Uiverse.io by mobinkakei - Tags: neumorphism, switch, on, off, bluetooth */
|
|
.switch-holder {
|
|
display: flex;
|
|
padding: 10px 20px;
|
|
border-radius: 10px;
|
|
box-shadow: -8px -8px 15px rgba(255, 255, 255, .7),
|
|
10px 10px 10px rgba(0, 0, 0, .2),
|
|
inset 8px 8px 15px rgba(255, 255, 255, .7),
|
|
inset 10px 10px 10px rgba(0, 0, 0, .2);
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.switch-label {
|
|
padding: 0 20px 0 10px
|
|
}
|
|
|
|
.switch-label i {
|
|
margin-right: 5px;
|
|
}
|
|
|
|
.switch-toggle {
|
|
height: 40px;
|
|
}
|
|
|
|
.switch-toggle input[type="checkbox"] {
|
|
position: absolute;
|
|
opacity: 0;
|
|
z-index: -2;
|
|
}
|
|
|
|
.switch-toggle input[type="checkbox"]+label {
|
|
position: relative;
|
|
display: inline-block;
|
|
width: 100px;
|
|
height: 40px;
|
|
border-radius: 20px;
|
|
margin: 0;
|
|
cursor: pointer;
|
|
box-shadow: inset -8px -8px 15px rgba(255, 255, 255, .6),
|
|
inset 10px 10px 10px rgba(0, 0, 0, .25);
|
|
}
|
|
|
|
.switch-toggle input[type="checkbox"]+label::before {
|
|
position: absolute;
|
|
content: 'OFF';
|
|
font-size: 13px;
|
|
text-align: center;
|
|
line-height: 25px;
|
|
top: 8px;
|
|
left: 8px;
|
|
width: 45px;
|
|
height: 25px;
|
|
border-radius: 20px;
|
|
background-color: #eeeeee;
|
|
box-shadow: -3px -3px 5px rgba(255, 255, 255, .5),
|
|
3px 3px 5px rgba(0, 0, 0, .25);
|
|
transition: .3s ease-in-out;
|
|
}
|
|
|
|
.switch-toggle input[type="checkbox"]:checked+label::before {
|
|
left: 50%;
|
|
content: 'ON';
|
|
color: #fff;
|
|
background-color: #00b33c;
|
|
box-shadow: -3px -3px 5px rgba(255, 255, 255, .5),
|
|
3px 3px 5px #00b33c;
|
|
}
|
|
</style>
|