index.scss 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. .nut-progress {
  2. width: 100%;
  3. position: relative;
  4. display: flex;
  5. .nut-progress-outer {
  6. flex: 1;
  7. background-color: #f3f3f3;
  8. border-radius: 12px;
  9. height: 10px;
  10. .nut-progress-inner {
  11. width: 30%;
  12. height: 100%;
  13. border-radius: 12px;
  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: 10px;
  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: 5px;
  53. .nut-progress-text {
  54. font-size: 7px;
  55. line-height: 10px;
  56. padding: 2px 4px;
  57. top: -100%;
  58. }
  59. }
  60. &.nut-progress-base {
  61. height: 10px;
  62. .nut-progress-text {
  63. font-size: 9px;
  64. line-height: 13px;
  65. }
  66. }
  67. &.nut-progress-large {
  68. height: 15px;
  69. .nut-progress-text {
  70. font-size: 13px;
  71. line-height: 18px;
  72. }
  73. }
  74. }
  75. .nut-progress-outer-part {
  76. width: 90%;
  77. }
  78. .nut-progress-text {
  79. padding: 0 5px;
  80. font-size: 13px;
  81. line-height: 1;
  82. min-width: 35px;
  83. }
  84. .nut-progress-insidetext {
  85. padding: 3px 5px 3px 6px;
  86. background: $progress-insidetext-background;
  87. border-radius: 5px;
  88. position: absolute;
  89. transition: all 0.4s;
  90. top: -42%;
  91. min-width: 0px;
  92. }
  93. .nut-icon-success,
  94. .nut-icon-fail {
  95. width: 10px;
  96. height: 10px;
  97. display: inline-block;
  98. }
  99. }