msgbox.css 2.3 KB

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