u-switch.ttss 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. @charset "UTF-8";
  2. /**
  3. * 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量
  4. * uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用
  5. */
  6. .u-switch.data-v-7cafa8c0 {
  7. position: relative;
  8. display: inline-block;
  9. box-sizing: initial;
  10. width: 2em;
  11. height: 1em;
  12. background-color: #fff;
  13. border: 1px solid rgba(0, 0, 0, 0.1);
  14. border-radius: 1em;
  15. transition: background-color 0.3s;
  16. font-size: 50rpx;
  17. }
  18. .u-switch__node.data-v-7cafa8c0 {
  19. display: flex;
  20. flex-direction: row;
  21. align-items: center;
  22. justify-content: center;
  23. position: absolute;
  24. top: 0;
  25. left: 0;
  26. border-radius: 100%;
  27. z-index: 1;
  28. background-color: #fff;
  29. background-color: #fff;
  30. box-shadow: 0 3px 1px 0 rgba(0, 0, 0, 0.05), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 3px 3px 0 rgba(0, 0, 0, 0.05);
  31. box-shadow: 0 3px 1px 0 rgba(0, 0, 0, 0.05), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 3px 3px 0 rgba(0, 0, 0, 0.05);
  32. transition: -webkit-transform 0.3s cubic-bezier(0.3, 1.05, 0.4, 1.05);
  33. transition: transform 0.3s cubic-bezier(0.3, 1.05, 0.4, 1.05);
  34. transition: transform 0.3s cubic-bezier(0.3, 1.05, 0.4, 1.05), -webkit-transform 0.3s cubic-bezier(0.3, 1.05, 0.4, 1.05);
  35. transition: -webkit-transform cubic-bezier(0.3, 1.05, 0.4, 1.05);
  36. transition: transform cubic-bezier(0.3, 1.05, 0.4, 1.05);
  37. transition: transform cubic-bezier(0.3, 1.05, 0.4, 1.05), -webkit-transform cubic-bezier(0.3, 1.05, 0.4, 1.05);
  38. transition: transform 0.3s cubic-bezier(0.3, 1.05, 0.4, 1.05);
  39. }
  40. .u-switch__loading.data-v-7cafa8c0 {
  41. display: flex;
  42. flex-direction: row;
  43. align-items: center;
  44. justify-content: center;
  45. }
  46. .u-switch--on.data-v-7cafa8c0 {
  47. background-color: #1989fa;
  48. }
  49. .u-switch--on .u-switch__node.data-v-7cafa8c0 {
  50. -webkit-transform: translateX(100%);
  51. transform: translateX(100%);
  52. }
  53. .u-switch--disabled.data-v-7cafa8c0 {
  54. opacity: 0.4;
  55. }