read.wxss 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. /* pages/read/read.wxss */
  2. .container {
  3. min-height: 100vh;
  4. padding: 50rpx 40rpx;
  5. padding-bottom: 140rpx;
  6. transition: background-color 0.3s ease;
  7. }
  8. .content {
  9. min-height: calc(100vh - 250rpx);
  10. max-width: 700rpx;
  11. margin: 0 auto;
  12. }
  13. .chapter-title {
  14. font-size: 38rpx;
  15. font-weight: 600;
  16. text-align: center;
  17. margin-bottom: 50rpx;
  18. padding-bottom: 30rpx;
  19. border-bottom: 2rpx solid rgba(0, 0, 0, 0.08);
  20. color: #1a1a1a;
  21. line-height: 1.5;
  22. position: relative;
  23. }
  24. .chapter-title::after {
  25. content: '';
  26. position: absolute;
  27. bottom: -2rpx;
  28. left: 50%;
  29. transform: translateX(-50%);
  30. width: 60rpx;
  31. height: 2rpx;
  32. background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  33. }
  34. .chapter-content {
  35. line-height: 2.2;
  36. color: #333;
  37. text-align: justify;
  38. font-size: 32rpx;
  39. letter-spacing: 1rpx;
  40. word-spacing: 2rpx;
  41. }
  42. .toolbar {
  43. position: fixed;
  44. bottom: 0;
  45. left: 0;
  46. right: 0;
  47. display: flex;
  48. background: rgba(255, 255, 255, 0.98);
  49. backdrop-filter: blur(20rpx);
  50. border-top: 1rpx solid rgba(0, 0, 0, 0.08);
  51. padding: 24rpx 0;
  52. padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
  53. box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.08);
  54. z-index: 10;
  55. }
  56. .tool-item {
  57. flex: 1;
  58. text-align: center;
  59. font-size: 28rpx;
  60. color: #333;
  61. padding: 12rpx;
  62. font-weight: 500;
  63. transition: all 0.3s ease;
  64. position: relative;
  65. }
  66. .tool-item:active {
  67. color: #667eea;
  68. transform: scale(0.95);
  69. }
  70. .tool-item::before {
  71. content: '';
  72. position: absolute;
  73. top: 0;
  74. left: 50%;
  75. transform: translateX(-50%);
  76. width: 0;
  77. height: 4rpx;
  78. background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  79. border-radius: 2rpx;
  80. transition: width 0.3s ease;
  81. }
  82. .tool-item:active::before {
  83. width: 60%;
  84. }
  85. .settings-panel {
  86. position: fixed;
  87. bottom: 100rpx;
  88. left: 0;
  89. right: 0;
  90. background: rgba(255, 255, 255, 0.98);
  91. backdrop-filter: blur(20rpx);
  92. padding: 40rpx 30rpx;
  93. padding-bottom: calc(40rpx + env(safe-area-inset-bottom));
  94. box-shadow: 0 -4rpx 30rpx rgba(0, 0, 0, 0.12);
  95. z-index: 100;
  96. border-top-left-radius: 24rpx;
  97. border-top-right-radius: 24rpx;
  98. animation: slideUp 0.3s ease;
  99. }
  100. @keyframes slideUp {
  101. from {
  102. transform: translateY(100%);
  103. }
  104. to {
  105. transform: translateY(0);
  106. }
  107. }
  108. .settings-title {
  109. font-size: 34rpx;
  110. font-weight: 600;
  111. margin-bottom: 36rpx;
  112. color: #1a1a1a;
  113. text-align: center;
  114. position: relative;
  115. padding-bottom: 20rpx;
  116. }
  117. .settings-title::after {
  118. content: '';
  119. position: absolute;
  120. bottom: 0;
  121. left: 50%;
  122. transform: translateX(-50%);
  123. width: 60rpx;
  124. height: 4rpx;
  125. background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  126. border-radius: 2rpx;
  127. }
  128. .setting-item {
  129. margin-bottom: 36rpx;
  130. }
  131. .setting-item:last-child {
  132. margin-bottom: 0;
  133. }
  134. .setting-label {
  135. font-size: 28rpx;
  136. color: #666;
  137. margin-bottom: 24rpx;
  138. display: block;
  139. font-weight: 500;
  140. }
  141. .font-slider-container {
  142. display: flex;
  143. align-items: center;
  144. gap: 20rpx;
  145. }
  146. .font-slider {
  147. flex: 1;
  148. }
  149. .font-size-text {
  150. font-size: 26rpx;
  151. color: #667eea;
  152. min-width: 90rpx;
  153. text-align: right;
  154. font-weight: 600;
  155. background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  156. padding: 8rpx 16rpx;
  157. border-radius: 12rpx;
  158. }
  159. .color-picker {
  160. display: flex;
  161. gap: 24rpx;
  162. justify-content: center;
  163. padding: 10rpx 0;
  164. }
  165. .color-item {
  166. width: 70rpx;
  167. height: 70rpx;
  168. border-radius: 50%;
  169. border: 4rpx solid transparent;
  170. transition: all 0.3s ease;
  171. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
  172. position: relative;
  173. }
  174. .color-item::after {
  175. content: '';
  176. position: absolute;
  177. top: 50%;
  178. left: 50%;
  179. transform: translate(-50%, -50%);
  180. width: 24rpx;
  181. height: 24rpx;
  182. background: #fff;
  183. border-radius: 50%;
  184. opacity: 0;
  185. transition: opacity 0.3s ease;
  186. }
  187. .color-item.active {
  188. border-color: #667eea;
  189. transform: scale(1.1);
  190. box-shadow: 0 6rpx 20rpx rgba(102, 126, 234, 0.3);
  191. }
  192. .color-item.active::after {
  193. opacity: 1;
  194. }
  195. .mask {
  196. position: fixed;
  197. top: 0;
  198. left: 0;
  199. right: 0;
  200. bottom: 0;
  201. background: rgba(0, 0, 0, 0.5);
  202. z-index: 99;
  203. animation: fadeIn 0.3s ease;
  204. }
  205. @keyframes fadeIn {
  206. from {
  207. opacity: 0;
  208. }
  209. to {
  210. opacity: 1;
  211. }
  212. }