message.scss 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. .el-message {
  2. overflow: visible;
  3. &__badge {
  4. animation: el-message-badge .42s;
  5. padding: 4px 8px;
  6. position: absolute;
  7. box-shadow: 0 1px 3px rgba(#000, .2), 0 1px 1px rgba(#000, .14), 0 2px 1px -1px rgba(#000, .12);
  8. background-color: $--color-danger;
  9. color: $--color-white;
  10. border-radius: 4px;
  11. top: -10px;
  12. left: -10px;
  13. font-size: 12px;
  14. line-height: 12px;
  15. }
  16. &__progress {
  17. z-index: -1;
  18. position: absolute;
  19. height: 3px;
  20. bottom: 0;
  21. left: 10px;
  22. right: 10px;
  23. animation: el-message-progress linear;
  24. background-color: currentColor;
  25. opacity: .3;
  26. transform-origin: 0 50%;
  27. transform: scaleX(0);
  28. }
  29. }
  30. @keyframes el-message-badge {
  31. 15% {
  32. transform: translate3d(-25%, 0, 0) rotate3d(0, 0, 1, -5deg)
  33. }
  34. 30% {
  35. transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 3deg)
  36. }
  37. 45% {
  38. transform: translate3d(-15%, 0, 0) rotate3d(0, 0, 1, -3deg)
  39. }
  40. 60% {
  41. transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 2deg)
  42. }
  43. 75% {
  44. transform: translate3d(-5%, 0, 0) rotate3d(0, 0, 1, -1deg)
  45. }
  46. }
  47. @keyframes el-message-progress {
  48. 0% {
  49. transform: scaleX(1)
  50. }
  51. 100% {
  52. transform: scaleX(0)
  53. }
  54. }