modal.css 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. uni-modal {
  2. position: fixed;
  3. top: 0;
  4. right: 0;
  5. bottom: 0;
  6. left: 0;
  7. z-index: 999;
  8. display: block;
  9. box-sizing: border-box;
  10. }
  11. .uni-modal {
  12. position: fixed;
  13. z-index: 999;
  14. width: 80%;
  15. max-width: 300px;
  16. top: 50%;
  17. left: 50%;
  18. transform: translate(-50%, -50%);
  19. background-color: #ffffff;
  20. text-align: center;
  21. border-radius: 3px;
  22. overflow: hidden;
  23. }
  24. .uni-modal * {
  25. box-sizing: border-box;
  26. }
  27. .uni-modal__hd {
  28. padding: 1em 1.6em 0.3em;
  29. }
  30. .uni-modal__title {
  31. font-weight: 400;
  32. font-size: 18px;
  33. word-wrap: break-word;
  34. word-break: break-all;
  35. white-space: pre-wrap;
  36. overflow: hidden;
  37. text-overflow: ellipsis;
  38. display: -webkit-box;
  39. -webkit-line-clamp: 2;
  40. -webkit-box-orient: vertical;
  41. }
  42. .uni-modal__bd {
  43. padding: 1.3em 1.6em 1.3em;
  44. min-height: 40px;
  45. font-size: 15px;
  46. line-height: 1.4;
  47. word-wrap: break-word;
  48. word-break: break-all;
  49. white-space: pre-wrap;
  50. color: #999999;
  51. max-height: 400px;
  52. overflow-x: hidden;
  53. overflow-y: auto;
  54. }
  55. .uni-modal__textarea {
  56. resize: none;
  57. border: 0;
  58. margin: 0;
  59. width: 90%;
  60. padding: 10px;
  61. font-size: 20px;
  62. outline: none;
  63. border: none;
  64. background-color: #eee;
  65. text-decoration: inherit;
  66. }
  67. .uni-modal__ft {
  68. position: relative;
  69. line-height: 48px;
  70. font-size: 18px;
  71. display: flex;
  72. }
  73. .uni-modal__ft:after {
  74. content: ' ';
  75. position: absolute;
  76. left: 0;
  77. top: 0;
  78. right: 0;
  79. height: 1px;
  80. border-top: 1px solid #d5d5d6;
  81. color: #d5d5d6;
  82. transform-origin: 0 0;
  83. transform: scaleY(0.5);
  84. }
  85. .uni-modal__btn {
  86. display: block;
  87. flex: 1;
  88. color: #3cc51f;
  89. text-decoration: none;
  90. -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  91. position: relative;
  92. cursor: pointer;
  93. }
  94. .uni-modal__btn:active {
  95. background-color: #eeeeee;
  96. }
  97. .uni-modal__btn:after {
  98. content: ' ';
  99. position: absolute;
  100. left: 0;
  101. top: 0;
  102. width: 1px;
  103. bottom: 0;
  104. border-left: 1px solid #d5d5d6;
  105. color: #d5d5d6;
  106. transform-origin: 0 0;
  107. transform: scaleX(0.5);
  108. }
  109. .uni-modal__btn:first-child:after {
  110. display: none;
  111. }
  112. .uni-modal__btn_default {
  113. color: #353535;
  114. }
  115. .uni-modal__btn_primary {
  116. color: #007aff;
  117. }
  118. @media (prefers-color-scheme: dark) {
  119. .uni-modal {
  120. color: var(--UI-FG-0);
  121. background-color: var(--UI-BG-2);
  122. }
  123. .uni-modal__bd {
  124. color: var(--UI-FG-1);
  125. }
  126. .uni-modal__btn:active {
  127. color: rgb(170, 170, 170);
  128. background-color: var(--UI-BG-COLOR-ACTIVE);
  129. }
  130. .uni-modal__ft:after,
  131. .uni-modal__btn:after {
  132. color: var(--UI-BORDER-COLOR-1);
  133. border-color: var(--UI-BORDER-COLOR-1);
  134. }
  135. }