index.scss 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. .nut-progress {
  2. width: 100%;
  3. position: relative;
  4. display: flex;
  5. .nut-progress-outer {
  6. flex: 1;
  7. background-color: $progress-outer-background-color;
  8. border-radius: $progress-outer-border-radius;
  9. height: 10px;
  10. .nut-progress-inner {
  11. width: 30%;
  12. height: 100%;
  13. border-radius: $progress-outer-border-radius;
  14. background: $progress-inner-background-color;
  15. -webkit-transition: all 0.4s;
  16. transition: all 0.4s;
  17. // position: relative;
  18. .nut-progress-text {
  19. display: flex;
  20. flex-direction: column;
  21. justify-content: center;
  22. color: #fff;
  23. }
  24. }
  25. .nut-active {
  26. &:before {
  27. content: '';
  28. position: absolute;
  29. top: 0;
  30. left: 0;
  31. right: 0;
  32. bottom: 0;
  33. border-radius: $progress-outer-border-radius;
  34. animation: progressActive 2s ease-in-out infinite;
  35. }
  36. }
  37. @keyframes progressActive {
  38. 0% {
  39. background: rgba(255, 255, 255, 0.1);
  40. width: 0;
  41. }
  42. 20% {
  43. background: rgba(255, 255, 255, 0.5);
  44. width: 0;
  45. }
  46. to {
  47. background: rgba(255, 255, 255, 0);
  48. width: 100%;
  49. }
  50. }
  51. &.nut-progress-small {
  52. height: $progress-small-height;
  53. .nut-progress-text {
  54. font-size: $progress-small-text-font-size;
  55. line-height: $progress-small-text-line-height;
  56. padding: $progress-small-text-padding;
  57. // top: $progress-small-text-top;
  58. top: 50%;
  59. }
  60. }
  61. &.nut-progress-base {
  62. height: $progress-base-height;
  63. .nut-progress-text {
  64. font-size: $progress-base-text-font-size;
  65. line-height: $progress-base-text-line-height;
  66. padding: $progress-base-text-padding;
  67. top: 50%;
  68. }
  69. }
  70. &.nut-progress-large {
  71. height: $progress-large-height;
  72. .nut-progress-text {
  73. font-size: $progress-large-text-font-size;
  74. line-height: $progress-large-text-line-height;
  75. padding: $progress-large-text-padding;
  76. top: 50%;
  77. }
  78. }
  79. }
  80. .nut-progress-outer-part {
  81. width: 90%;
  82. }
  83. .nut-progress-text {
  84. padding: 0 5px;
  85. font-size: 13px;
  86. line-height: 1;
  87. min-width: 35px;
  88. display: flex;
  89. align-items: center;
  90. }
  91. .nut-progress-insidetext {
  92. padding: $progress-insidetext-padding;
  93. background: $progress-insidetext-background;
  94. border-radius: $progress-insidetext-border-radius;
  95. position: absolute;
  96. transition: all 0.4s;
  97. top: 50%;
  98. min-width: 0px;
  99. }
  100. .nut-icon-success,
  101. .nut-icon-fail {
  102. width: 10px;
  103. height: 10px;
  104. display: inline-block;
  105. }
  106. }