honeySwitch.css 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*[class|=switch] {*/
  2. /*position: relative;*/
  3. /*display: inline-block;*/
  4. /*width: 50px;*/
  5. /*height: 30px;*/
  6. /*border-radius: 16px;*/
  7. /*line-height: 32px;*/
  8. /*-webkit-tap-highlight-color:rgba(255,255,255,0);*/
  9. /*}*/
  10. /*.switch-on {*/
  11. /*border: 1px solid white;*/
  12. /*box-shadow: white 0px 0px 0px 16px inset;*/
  13. /*transition: border 0.4s, box-shadow 0.2s, background-color 1.2s;*/
  14. /*background-color: white;*/
  15. /*cursor: pointer;*/
  16. /*}*/
  17. /*.slider {*/
  18. /*position: absolute;*/
  19. /*display: inline-block;*/
  20. /*width: 30px;*/
  21. /*height: 28px;*/
  22. /*background: white;*/
  23. /*box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);*/
  24. /*border-radius: 50%;*/
  25. /*left: 0;*/
  26. /*top: 0;*/
  27. /*}*/
  28. /*.switch-on .slider {*/
  29. /*left: 20px;*/
  30. /*transition: background-color 0.4s, left 0.2s;*/
  31. /*}*/
  32. /*.switch-off {*/
  33. /*border: 1px solid #dfdfdf;*/
  34. /*transition: border 0.4s, box-shadow 0.4s;*/
  35. /*background-color: rgb(255, 255, 255);*/
  36. /*box-shadow: rgb(223, 223, 223) 0px 0px 0px 0px inset;*/
  37. /*background-color: rgb(255, 255, 255);*/
  38. /*cursor: pointer;*/
  39. /*}*/
  40. /*.switch-off .slider {*/
  41. /*left: 0;*/
  42. /*transition: background-color 0.4s, left 0.2s;*/
  43. /*}*/
  44. /*.switch-on.switch-disabled{*/
  45. /*opacity:.5;*/
  46. /*cursor:auto;*/
  47. /*}*/
  48. /*.switch-off.switch-disabled{*/
  49. /*background-color:#F0F0F0 !important;*/
  50. /*cursor:auto;*/
  51. /*}*/
  52. .mui-switch {
  53. width: 52px;
  54. height: 31px;
  55. position: relative;
  56. border: 1px solid #dfdfdf;
  57. background-color: #fdfdfd;
  58. box-shadow: #dfdfdf 0 0 0 0 inset;
  59. border-radius: 20px;
  60. border-top-left-radius: 20px;
  61. border-top-right-radius: 20px;
  62. border-bottom-left-radius: 20px;
  63. border-bottom-right-radius: 20px;
  64. background-clip: content-box;
  65. display: inline-block;
  66. -webkit-appearance: none;
  67. user-select: none;
  68. outline: none !important;
  69. cursor:pointer;}
  70. .mui-switch:before {
  71. content: '';
  72. width: 29px;
  73. height: 29px;
  74. position: absolute;
  75. top: 0px;
  76. left: 0;
  77. border-radius: 20px;
  78. border-top-left-radius: 20px;
  79. border-top-right-radius: 20px;
  80. border-bottom-left-radius: 20px;
  81. border-bottom-right-radius: 20px;
  82. background-color: #fff;
  83. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
  84. .mui-switch:checked {
  85. border-color: #64bd63;
  86. box-shadow: #64bd63 0 0 0 16px inset;
  87. background-color: #64bd63; }
  88. .mui-switch:checked:before {
  89. left: 21px; }
  90. .mui-switch.mui-switch-animbg {
  91. transition: background-color ease 0.4s; }
  92. .mui-switch.mui-switch-animbg:before {
  93. transition: left 0.3s; }
  94. .mui-switch.mui-switch-animbg:checked {
  95. box-shadow: #dfdfdf 0 0 0 0 inset;
  96. background-color: #64bd63;
  97. transition: border-color 0.4s, background-color ease 0.4s; }
  98. .mui-switch.mui-switch-animbg:checked:before {
  99. transition: left 0.3s; }
  100. .mui-switch.mui-switch-anim {
  101. transition: border cubic-bezier(0, 0, 0, 1) 0.4s, box-shadow cubic-bezier(0, 0, 0, 1) 0.4s; }
  102. .mui-switch.mui-switch-anim:before {
  103. transition: left 0.3s; }
  104. .mui-switch.mui-switch-anim:checked {
  105. box-shadow: #64bd63 0 0 0 16px inset;
  106. background-color: #64bd63;
  107. transition: border ease 0.4s, box-shadow ease 0.4s, background-color ease 1.2s; }
  108. .mui-switch.mui-switch-anim:checked:before {
  109. transition: left 0.3s; }
  110. /*# sourceMappingURL=mui-switch.css.map */