|
|
@ -1,34 +1,43 @@ |
|
|
|
@switchPrefixCls:ant-switch; |
|
|
|
|
|
|
|
@duration:.3s; |
|
|
|
|
|
|
|
.@{switchPrefixCls}{ |
|
|
|
position: relative; |
|
|
|
display: inline-block; |
|
|
|
width: 38px; |
|
|
|
height: 20px; |
|
|
|
box-sizing: border-box; |
|
|
|
width: 44px; |
|
|
|
height: 22px; |
|
|
|
line-height: 20px; |
|
|
|
vertical-align: middle; |
|
|
|
border-radius: 20px 20px; |
|
|
|
border: 1px solid #bcbcbc; |
|
|
|
background-color: #bcbcbc; |
|
|
|
border: 1px solid #ccc; |
|
|
|
background-color: #ccc; |
|
|
|
cursor: pointer; |
|
|
|
transition: all 0.3s cubic-bezier(0.35, 0, 0.25, 1); |
|
|
|
transition: all @duration cubic-bezier(0.35, 0, 0.25, 1); |
|
|
|
|
|
|
|
&-inner { |
|
|
|
color:#fff; |
|
|
|
font-size: 12px; |
|
|
|
position: absolute; |
|
|
|
left:24px; |
|
|
|
} |
|
|
|
|
|
|
|
&:after{ |
|
|
|
display: block; |
|
|
|
position: absolute; |
|
|
|
top: -1px; |
|
|
|
left: -1px; |
|
|
|
width: 20px; |
|
|
|
height: 20px; |
|
|
|
width: 18px; |
|
|
|
height: 18px; |
|
|
|
left: 2px; |
|
|
|
top:1px; |
|
|
|
border-radius: 50% 50%; |
|
|
|
background-color: #ffffff; |
|
|
|
content: " "; |
|
|
|
cursor: pointer; |
|
|
|
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.26); |
|
|
|
transform: scale(1); |
|
|
|
transition: left 0.3s cubic-bezier(0.35, 0, 0.25, 1); |
|
|
|
transition: left @duration cubic-bezier(0.35, 0, 0.25, 1); |
|
|
|
animation-timing-function: cubic-bezier(0.35, 0, 0.25, 1); |
|
|
|
animation-duration: 0.3s; |
|
|
|
animation-duration: @duration; |
|
|
|
animation-name: rcSwitchOff; |
|
|
|
} |
|
|
|
|
|
|
@ -38,16 +47,22 @@ |
|
|
|
} |
|
|
|
|
|
|
|
&-checked{ |
|
|
|
border: 1px solid #64b6f7; |
|
|
|
background-color: #64b6f7; |
|
|
|
border: 1px solid #87d068; |
|
|
|
background-color: #87d068; |
|
|
|
|
|
|
|
.@{switchPrefixCls}-inner { |
|
|
|
left:6px; |
|
|
|
} |
|
|
|
|
|
|
|
&:after{ |
|
|
|
left: 18px; |
|
|
|
left: 22px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
&-disabled{ |
|
|
|
cursor: no-drop; |
|
|
|
background: #ccc; |
|
|
|
border-color:#ccc; |
|
|
|
|
|
|
|
&:after{ |
|
|
|
background: #9e9e9e; |
|
|
|