tzxq.wxss 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. .container {
  2. position: relative;
  3. width: 100%;
  4. min-height: 100vh;
  5. display: flex;
  6. flex-direction: column;
  7. box-sizing: border-box;
  8. }
  9. /* 背景图片样式 */
  10. .header {
  11. position: absolute;
  12. top: 0;
  13. left: 0;
  14. width: 100%;
  15. z-index: -1; /* 负值z-index确保在最底层 */
  16. }
  17. .background {
  18. width: 100%;
  19. height: auto;
  20. }
  21. .custom-nav {
  22. display: flex;
  23. align-items: center;
  24. height: 90rpx;
  25. margin-bottom: 20rpx;
  26. position: fixed;
  27. top: 0;
  28. left: 0;
  29. right: 0;
  30. z-index: 1000;
  31. padding: 0 20rpx;
  32. padding-top: 44px; /* 适配iPhone状态栏 */
  33. }
  34. .fixed-back {
  35. font-size: 40rpx;
  36. text-align: center;
  37. color: #fff;
  38. }
  39. .nav-title {
  40. flex: 1;
  41. text-align: center;
  42. font-size: 34rpx;
  43. color: #fff;
  44. }
  45. /* 通知详情卡片样式 */
  46. .notice-detail-wrapper {
  47. position: relative;
  48. z-index: 5; /* 确保在背景之上 */
  49. margin-top: calc(180rpx + env(safe-area-inset-top)); /* 适配不同顶部安全区域 */
  50. padding: 0 30rpx;
  51. flex: 1;
  52. width: 100%;
  53. box-sizing: border-box;
  54. }
  55. .notice-detail {
  56. background-color: #fff;
  57. border-radius: 20rpx;
  58. padding: 40rpx 30rpx;
  59. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
  60. width: 100%;
  61. box-sizing: border-box;
  62. }
  63. /* 标题居中 */
  64. .notice-title {
  65. font-size: 40rpx;
  66. font-weight: bold;
  67. color: #333;
  68. text-align: center;
  69. margin-bottom: 20rpx;
  70. position: relative;
  71. word-wrap: break-word;
  72. line-height: 1.4;
  73. }
  74. /* 标题下方的分隔线 */
  75. .title-divider {
  76. width: 90%;
  77. height: 4rpx;
  78. opacity: 1;
  79. margin: 20rpx auto;
  80. background-color: rgba(242, 246, 250, 1);
  81. }
  82. /* 通知内容样式 */
  83. .notice-content {
  84. font-size: 32rpx;
  85. color: rgba(46, 48, 56, 1);
  86. line-height: 1.6;
  87. margin-bottom: 60rpx;
  88. word-wrap: break-word;
  89. }
  90. /* rich-text内部的段落也有缩进 */
  91. .notice-content rich-text {
  92. display: block;
  93. width: 100%;
  94. }
  95. /* 确保富文本中的图片自适应 */
  96. .notice-content rich-text image {
  97. max-width: 100% !important;
  98. height: auto !important;
  99. }
  100. /* 落款和日期放在右下角 */
  101. .notice-footer {
  102. display: flex;
  103. flex-direction: column;
  104. align-items: flex-end;
  105. margin-top: 40rpx;
  106. }
  107. .notice-signature {
  108. font-size: 32rpx;
  109. color: #333;
  110. margin-bottom: 10rpx;
  111. }
  112. .notice-footer-date {
  113. font-size: 28rpx;
  114. color: #666;
  115. }
  116. /* 适配小屏设备 */
  117. @media screen and (max-width: 320px) {
  118. .notice-title {
  119. font-size: 36rpx;
  120. }
  121. .notice-content {
  122. font-size: 30rpx;
  123. }
  124. .notice-detail {
  125. padding: 30rpx 20rpx;
  126. }
  127. }
  128. /* 适配大屏设备 */
  129. @media screen and (min-width: 768px) {
  130. .notice-detail-wrapper {
  131. width: 90%;
  132. margin-left: auto;
  133. margin-right: auto;
  134. }
  135. }