_progress-bar.scss 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /* Progress bar */
  2. .progress {
  3. position: relative;
  4. overflow: visible;
  5. .progress-bar {
  6. width: 0px;
  7. position: absolute;
  8. top: 0;
  9. left: 0;
  10. overflow: visible;
  11. @include prefix(transition, all 1s cubic-bezier(0.50, 1, 0.5, 1), webkit);
  12. &.appear {
  13. .progress-bar-percent {
  14. opacity: 1;
  15. }
  16. }
  17. }
  18. }
  19. .progress-bar-percent {
  20. opacity: 0;
  21. }
  22. /* Progress bar style 01 */
  23. .progress-bar-style-01 {
  24. .progress {
  25. height: 4px;
  26. border-radius: 0;
  27. .progress-bar-title {
  28. position: absolute;
  29. bottom: 10px;
  30. }
  31. .progress-bar-percent {
  32. position: absolute;
  33. bottom: 17px;
  34. right: -20px;
  35. padding: 7px;
  36. min-width: 40px;
  37. min-height: 26px;
  38. border-radius: 3px;
  39. &:after {
  40. content: '';
  41. top: 100%;
  42. left: 50%;
  43. height: 0;
  44. width: 0;
  45. z-index: 9;
  46. margin-left: -4px;
  47. border-width: 4px;
  48. position: absolute;
  49. pointer-events: none;
  50. border: solid transparent;
  51. border-top-color: #232323;
  52. }
  53. }
  54. .progress-bar {
  55. height: 100%;
  56. }
  57. }
  58. }
  59. /* Progress bar style 02 */
  60. .progress-bar-style-02 {
  61. .progress {
  62. height: 30px;
  63. overflow: hidden;
  64. .progress-bar-percent {
  65. position: absolute;
  66. top: 9px;
  67. right: 20px;
  68. min-width: 26px;
  69. }
  70. .progress-bar-title {
  71. position: absolute;
  72. top: 9px;
  73. left: 20px;
  74. }
  75. .progress-bar {
  76. width: 0px;
  77. height: 100%;
  78. position: absolute;
  79. }
  80. }
  81. }
  82. /* Progress bar style 03 */
  83. .progress-bar-style-03 {
  84. .progress {
  85. height: 4px;
  86. .progress-bar-title {
  87. position: absolute;
  88. bottom: 14px;
  89. }
  90. .progress-bar {
  91. height: 100%;
  92. }
  93. .progress-bar-percent {
  94. position: absolute;
  95. bottom: 14px;
  96. right: 0;
  97. opacity: 1;
  98. }
  99. }
  100. }
  101. /* Progress bar style 04 */
  102. .progress-bar-style-04 {
  103. .progress {
  104. height: 8px;
  105. border-radius: 6px;
  106. .progress-bar-title {
  107. position: absolute;
  108. bottom: 15px;
  109. }
  110. .progress-bar {
  111. height: 100%;
  112. border-radius: 6px;
  113. }
  114. .progress-bar-percent {
  115. position: absolute;
  116. bottom: 15px;
  117. right: 0px;
  118. }
  119. }
  120. }