msgbox.css 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. #message-box {
  2. top: 0;
  3. left: 0;
  4. right: 0;
  5. bottom: 0;
  6. display: flex;
  7. position: fixed;
  8. box-shadow: 5px 5px 50px rgba(0, 0, 0, 0.35);
  9. background-color: rgba(0, 0, 0, .25);
  10. animation: fadein .25s ease-in-out;
  11. z-index: 9999990;
  12. }
  13. #message-box > div {
  14. top: 3rem;
  15. right: 3rem;
  16. min-width: 10rem;
  17. max-width: 50vw;
  18. min-height: 5rem;
  19. max-height: 90vh;
  20. position: fixed;
  21. display: flex;
  22. flex-direction: column;
  23. background-color: white;
  24. box-shadow: 5px 5px 50px rgba(0, 0, 0, 0.35);
  25. z-index: 9999991;
  26. }
  27. #message-box.fadeout {
  28. animation: fadeout .5s ease-in-out;
  29. }
  30. #message-box.center {
  31. align-items: center;
  32. justify-content: center;
  33. }
  34. #message-box.center #message-box-contents {
  35. text-align: center;
  36. }
  37. #message-box.center > div {
  38. top: unset;
  39. right: unset;
  40. }
  41. #message-box-title {
  42. font-weight: bold;
  43. background-color: rgb(145, 208, 198);
  44. padding: .75rem 24px .75rem 52px;
  45. font-size: 1rem;
  46. position: relative;
  47. }
  48. #message-box-title::before {
  49. content: "";
  50. width: 0;
  51. height: 0;
  52. padding: 0 32px 32px 0;
  53. background: url(/images/icon/32.png);
  54. position: absolute;
  55. left: .5rem;
  56. top: 0;
  57. bottom: 0;
  58. margin: auto;
  59. }
  60. #message-box.danger #message-box-title {
  61. background-color: firebrick;
  62. color: white;
  63. }
  64. #message-box.danger #message-box-title::before {
  65. background: url('/images/icon/32x.png');
  66. }
  67. #message-box.danger #message-box-contents {
  68. font-weight: bold;
  69. }
  70. #message-box.danger #message-box-close-icon svg:hover {
  71. fill: #600;
  72. }
  73. #message-box-close-icon {
  74. cursor: pointer;
  75. position: absolute;
  76. right: 3px;
  77. top: 4px;
  78. }
  79. #message-box-close-icon svg {
  80. width: 16px;
  81. height: 16px;
  82. }
  83. #message-box-contents {
  84. overflow: auto;
  85. padding: 1.5rem .75rem;
  86. position: relative;
  87. flex-grow: 9;
  88. word-break: break-word;
  89. }
  90. #message-box-buttons {
  91. padding: .75rem .375rem;
  92. background-color: #f0f0f0;
  93. text-align: center;
  94. }
  95. .non-windows #message-box-buttons {
  96. text-align: right;
  97. direction: rtl;
  98. }
  99. #message-box-buttons button {
  100. margin: 0 .375rem;
  101. }
  102. @keyframes fadein {
  103. from {
  104. opacity: 0;
  105. }
  106. to {
  107. opacity: 1;
  108. }
  109. }
  110. @keyframes fadeout {
  111. from {
  112. opacity: 1;
  113. }
  114. to {
  115. opacity: 0;
  116. }
  117. }