DragVerify.less 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. @radius: 4px;
  2. .darg-verify {
  3. position: relative;
  4. overflow: hidden;
  5. text-align: center;
  6. background-color: rgb(238, 238, 238);
  7. border: 1px solid #ddd;
  8. border-radius: @radius;
  9. &-bar {
  10. position: absolute;
  11. width: 0;
  12. height: 36px;
  13. background-color: @success-color;
  14. border-radius: @radius;
  15. &.to-left {
  16. width: 0 !important;
  17. transition: width 0.3s;
  18. }
  19. }
  20. &-content {
  21. position: absolute;
  22. top: 0;
  23. font-size: 12px;
  24. -webkit-text-size-adjust: none;
  25. background-color: -webkit-gradient(
  26. linear,
  27. left top,
  28. right top,
  29. color-stop(0, #333),
  30. color-stop(0.4, #333),
  31. color-stop(0.5, #fff),
  32. color-stop(0.6, #333),
  33. color-stop(1, #333)
  34. );
  35. animation: slidetounlock 3s infinite;
  36. -webkit-background-clip: text;
  37. -moz-user-select: none;
  38. -webkit-user-select: none;
  39. -o-user-select: none;
  40. -ms-user-select: none;
  41. user-select: none;
  42. -webkit-text-fill-color: transparent;
  43. &.success {
  44. -webkit-text-fill-color: @white;
  45. }
  46. & > * {
  47. -webkit-text-fill-color: #333;
  48. }
  49. }
  50. &-action {
  51. position: absolute;
  52. top: 0;
  53. left: 0;
  54. display: flex;
  55. cursor: move;
  56. background-color: @white;
  57. border-radius: @radius;
  58. justify-content: center;
  59. align-items: center;
  60. &__icon {
  61. cursor: inherit;
  62. }
  63. &.to-left {
  64. left: 0 !important;
  65. transition: left 0.3s;
  66. }
  67. }
  68. }
  69. @-webkit-keyframes slidetounlock {
  70. 0% {
  71. background-position: -120px 0;
  72. }
  73. 100% {
  74. background-position: 120px 0;
  75. }
  76. }