update switch

This commit is contained in:
yiminghe 2015-07-20 14:32:21 +08:00
parent 9823eabb36
commit 70fc084e44
3 changed files with 4 additions and 36 deletions

View File

@ -1,8 +1,8 @@
# 简单
# 不可用
- order: 1
最简单的用法
Switch 失效状态
---
@ -13,7 +13,7 @@ var container = document.getElementById('components-switch-demo-disabled');
var Test = React.createClass({
getInitialState() {
return {
disabled: false
disabled: true
}
},
toggle(){

View File

@ -6,7 +6,7 @@
---
开关选择器
开关选择器
## 何时使用

View File

@ -33,16 +33,10 @@
background-color: #ffffff;
content: " ";
cursor: pointer;
transform: scale(1);
transition: left @switch-duration @ease-in-out-circ;
animation-timing-function: linear;
animation-duration: @switch-duration;
animation-name: rcSwitchOff;
}
&:hover:after{
transform: scale(1.1);
animation-name: rcSwitchOn;
}
&-checked{
@ -65,13 +59,10 @@
&:after{
background: #ccc;
animation-name: none;
cursor: no-drop;
}
&:hover:after{
transform: scale(1);
animation-name: none;
}
&-inner {
@ -79,26 +70,3 @@
}
}
}
@keyframes rcSwitchOn {
0% {
transform: scale(1);
}
50% {
transform: scale(1.2);
}
100% {
transform: scale(1.1);
}
}
@keyframes rcSwitchOff {
0% {
transform: scale(1.1);
}
50%{
transform: scale(.9);
}
100% {
transform: scale(1);
}
}