43 lines
723 B
CSS
43 lines
723 B
CSS
.biswitch {
|
|
display: inline-block;
|
|
position: relative;
|
|
padding: 0.3em 0.5em;
|
|
border: 2px solid white;
|
|
border-radius: 3px;
|
|
width: 11em;
|
|
box-sizing: border-box;
|
|
overflow: hidden;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.biswitch .b {
|
|
float: right;
|
|
}
|
|
|
|
.biswitch::after {
|
|
content: '';
|
|
display: block;
|
|
height: 100%;
|
|
width: 50%;
|
|
background-color: var(--color-primary);
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: -1;
|
|
transform: skewX(-20deg) scaleY(1.1) scaleX(1.1) translateX(-4px);
|
|
|
|
transition: 0.2s;
|
|
transition-property: left, transform;
|
|
}
|
|
|
|
.biswitch.second::after {
|
|
left: 50%;
|
|
transform: skewX(-20deg) scaleX(1.2) translateX(2px);
|
|
}
|
|
|
|
.biswitch div {
|
|
display: inline-block;
|
|
pointer-events: none;
|
|
user-select: none;
|
|
}
|