progress.scss 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. @import '../common/base.scss';
  2. .m-progress{
  3. position: relative;
  4. line-height: 1;
  5. .m-progress-bar{
  6. padding-right: 50px;
  7. display: inline-block;
  8. vertical-align: middle;
  9. width: 100%;
  10. margin-right: -55px;
  11. box-sizing: border-box;
  12. .m-progress-bar__outer{
  13. height: 6px;
  14. border-radius: 100px;
  15. background-color: #ebeef5;
  16. overflow: hidden;
  17. position: relative;
  18. vertical-align: middle;
  19. .m-progress-bar__inner{
  20. position: absolute;
  21. left: 0;
  22. top: 0;
  23. height: 100%;
  24. background-color: $primary;
  25. text-align: right;
  26. border-radius: 100px;
  27. line-height: 1;
  28. white-space: nowrap;
  29. transition: width .6s ease;
  30. &::after{
  31. display: inline-block;
  32. content: "";
  33. height: 100%;
  34. vertical-align: middle;
  35. }
  36. .m-progress-bar__innerText{
  37. display: inline-block;
  38. vertical-align: middle;
  39. color: #fff;
  40. font-size: 12px;
  41. margin: 0 5px;
  42. }
  43. }
  44. }
  45. }
  46. .m-progress__text{
  47. font-size: 14px;
  48. color: #606266;
  49. display: inline-block;
  50. vertical-align: middle;
  51. margin-left: 10px;
  52. line-height: 1;
  53. .iconfont{
  54. font-size: 15px;
  55. }
  56. }
  57. }
  58. .m-progress--circle,
  59. .m-progress--dashboard{
  60. display: inline-block;
  61. position: relative;
  62. .m-progress__text{
  63. position: absolute;
  64. top: 50%;
  65. left: 0;
  66. width: 100%;
  67. text-align: center;
  68. margin: 0;
  69. transform: translateY(-50%);
  70. }
  71. }
  72. .is-success{
  73. .m-progress-bar__inner{
  74. background: $success !important;
  75. }
  76. .m-progress__text{
  77. color: $success;
  78. }
  79. }
  80. .is-warning{
  81. .m-progress-bar__inner{
  82. background: $warning !important;
  83. }
  84. .m-progress__text{
  85. color: $warning;
  86. }
  87. }
  88. .is-error{
  89. .m-progress-bar__inner{
  90. background: $danger !important;
  91. }
  92. .m-progress__text{
  93. color: $danger;
  94. }
  95. }