switchery.css 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. .switchery {
  2. background-color: #fff;
  3. border: 1px solid #dfdfdf;
  4. border-radius: 20px;
  5. cursor: pointer;
  6. display: inline-block;
  7. height: 30px;
  8. position: relative;
  9. vertical-align: middle;
  10. width: 50px;
  11. -moz-user-select: none;
  12. -khtml-user-select: none;
  13. -webkit-user-select: none;
  14. -ms-user-select: none;
  15. user-select: none;
  16. box-sizing: content-box;
  17. background-clip: content-box;
  18. border-color: #dfdfdf;
  19. -webkit-box-shadow: #dfdfdf 0px 0px 0px 0px inset;
  20. box-shadow: #dfdfdf 0px 0px 0px 0px inset;
  21. -webkit-transition: border 0.4s, box-shadow 0.4s, -webkit-box-shadow 0.4s ;
  22. transition: border 0.4s, box-shadow 0.4s, -webkit-box-shadow 0.4s ;
  23. background-color: #fff;
  24. }
  25. .switchery > small {
  26. background: #fff;
  27. border-radius: 100%;
  28. box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  29. height: 30px;
  30. position: absolute;
  31. top: 0;
  32. width: 30px;
  33. left: 0px;
  34. -webkit-transition:background-color 0.4s, left 0.2s;
  35. transition: background-color 0.4s, left 0.2s;
  36. }
  37. .switchery.checked {
  38. border-color: #1ab394;
  39. box-shadow: #1ab394 0px 0px 0px 16px inset;
  40. background-color: #1ab394;
  41. -webkit-transition: border 0.4s, box-shadow 0.4s, -webkit-box-shadow 0.4s, background-color 1.2s;
  42. transition: border 0.4s, box-shadow 0.4s, -webkit-box-shadow 0.4s, background-color 1.2s;
  43. }
  44. .switchery.checked > small {
  45. left: 20px; transition: background-color 0.4s, left 0.2s;
  46. }
  47. .switchery-small {
  48. border-radius: 20px;
  49. height: 20px;
  50. width: 33px;
  51. }
  52. .switchery-small > small {
  53. height: 20px;
  54. width: 20px;
  55. }
  56. .switchery.switchery-small.checked > small {
  57. left: 13px; transition: background-color 0.4s, left 0.2s;
  58. }