index.scss 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. .zh-strength-meter {
  2. position: relative;
  3. &-bar {
  4. position: relative;
  5. height: 4px;
  6. margin: 10px auto 6px;
  7. background: rgba(0, 0, 0, 0.25);
  8. border-radius: 3px;
  9. &::before,
  10. &::after {
  11. position: absolute;
  12. z-index: 10;
  13. display: block;
  14. width: 20%;
  15. height: inherit;
  16. content: '';
  17. background: transparent;
  18. border-color: #ffffff;
  19. border-style: solid;
  20. border-width: 0 5px 0 5px;
  21. }
  22. &::before {
  23. left: 20%;
  24. }
  25. &::after {
  26. right: 20%;
  27. }
  28. &--fill {
  29. position: absolute;
  30. width: 0;
  31. height: inherit;
  32. background: transparent;
  33. border-radius: inherit;
  34. transition: width 0.5s ease-in-out, background 0.25s;
  35. &[data-score='0'] {
  36. width: 20%;
  37. background: #e74242;
  38. }
  39. &[data-score='1'] {
  40. width: 40%;
  41. background: #ed6f6f;
  42. }
  43. &[data-score='2'] {
  44. width: 60%;
  45. background: #efbd47;
  46. }
  47. &[data-score='3'] {
  48. width: 80%;
  49. background: rgba(85, 209, 135, 0.5);
  50. }
  51. &[data-score='4'] {
  52. width: 100%;
  53. background: #55d187;
  54. }
  55. }
  56. }
  57. }