progressbar.css 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. .progress_bar
  2. {
  3. position: absolute;
  4. --hbw: min(50%, 200px);
  5. left: calc(50% - var(--hbw));
  6. right: calc(50% - var(--hbw));
  7. bottom: 50%;
  8. height: 44px;
  9. }
  10. .progress_bar .message
  11. {
  12. color: black;
  13. position:absolute;
  14. height: 24px;
  15. line-height: 24px;
  16. top:0;
  17. left:4px;
  18. right:4px;
  19. text-align: left;
  20. text-shadow: 0px 0px 6px white;
  21. overflow: hidden;
  22. }
  23. .progress_bar .bar
  24. {
  25. background-color: white;
  26. position:absolute;
  27. height: 16px;
  28. bottom:4px;
  29. left:4px;
  30. right:4px;
  31. border: 1px solid #808080;
  32. line-height: 17px;
  33. color:black;
  34. text-align: center;
  35. box-shadow: 2px 2px 10px 0px rgba(50, 50, 50, 0.3);
  36. }
  37. .progress_bar .bar .progress
  38. {
  39. background-color: #f0a0a0;
  40. position:absolute;
  41. height: 16px;
  42. left:0;
  43. top:0;
  44. border:none;
  45. }
  46. .progress_bar .bar .percent
  47. {
  48. position:absolute;
  49. height: 16px;
  50. left:0;
  51. right:0;
  52. }
  53. /* undeterminate */
  54. .progress_bar.undeterminate
  55. {
  56. display: inline-block;
  57. left: 0;
  58. right: 0;
  59. top: 44%;
  60. text-align: center;
  61. }
  62. .progress_bar.undeterminate:after {
  63. content: " ";
  64. display: inline-block;
  65. width: 32px;
  66. height: 32px;
  67. margin: 24px;
  68. border-radius: 50%;
  69. border: 6px solid #fff;
  70. border-color: red rgb(240, 180, 180) red rgb(240, 180, 180);
  71. animation: progress_undeterminate 1.2s linear infinite;
  72. }
  73. .progress_bar.undeterminate .message
  74. {
  75. text-align: center;
  76. }
  77. .progress_bar.undeterminate .bar
  78. {
  79. display: none;
  80. }
  81. @keyframes progress_undeterminate
  82. {
  83. 0% {
  84. transform: rotate(0deg);
  85. }
  86. 100% {
  87. transform: rotate(360deg);
  88. }
  89. }