_toast.scss 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. .ui-toast {
  2. position: fixed;
  3. display: flex;
  4. align-items: center;
  5. justify-content: center;
  6. top: 30px;
  7. left: 0;
  8. right: 0;
  9. min-width: 100px;
  10. height: 100px;
  11. overflow: hidden;
  12. pointer-events:none;
  13. }
  14. .ui-toast__box {
  15. color: #fff;
  16. font-size: 14px;
  17. position: relative;
  18. display: flex;
  19. align-items: center;
  20. justify-content: center;
  21. background-color: rgba($color: #1a1a1a, $alpha: 0.8);
  22. box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.7);
  23. border-radius: 4px;
  24. border: 1px solid #000000;
  25. padding: 8px 20px;
  26. pointer-events: all;
  27. &.fixed,
  28. &.success,
  29. &.error,
  30. &.warn{
  31. i{
  32. display:inline-block;
  33. }
  34. }
  35. &.success {
  36. .icon {
  37. background-image: url('#{$img-base-path}icons/toast-success.png');
  38. }
  39. }
  40. &.error {
  41. .icon {
  42. background-image: url('#{$img-base-path}icons/toast-error.png');
  43. }
  44. }
  45. &.warn {
  46. .icon {
  47. background-image: url('#{$img-base-path}icons/toast-warn.png');
  48. }
  49. }
  50. &::after {
  51. content: '';
  52. position: absolute;
  53. left: 1px;
  54. right: 1px;
  55. bottom: 1px;
  56. top: 1px;
  57. border: 1px solid rgba($color: #fff, $alpha: 0.1);
  58. border-radius: 4px;
  59. z-index: 0;
  60. pointer-events: none;
  61. }
  62. // >i{
  63. // display: none;
  64. // }
  65. .icon{
  66. margin-right: 10px;
  67. font-size: 0;
  68. width: 16px;
  69. height: 16px;
  70. background-repeat: no-repeat;
  71. background-position: center center;
  72. background-size: contain;
  73. }
  74. .close{
  75. cursor: pointer;
  76. font-size: 14px;
  77. margin-left: 20px;
  78. }
  79. }
  80. .ui-toast__msg{
  81. display: flex;
  82. align-items: center;
  83. img{
  84. width:24px;
  85. height: 24px;
  86. }
  87. }
  88. body[is-mobile] .ui-toast__box {
  89. max-width: 80%;
  90. }