与牧同行-小程序用户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

321 lines
5.6 KiB

  1. .article-detail-container {
  2. min-height: 100vh;
  3. background: #f8fafc;
  4. position: relative;
  5. }
  6. /* 文章内容容器 */
  7. .article-content {
  8. height: 100vh;
  9. position: relative;
  10. }
  11. /* 文章封面 */
  12. .article-cover {
  13. position: relative;
  14. height: 500rpx;
  15. overflow: hidden;
  16. }
  17. .cover-image {
  18. width: 100%;
  19. height: 100%;
  20. object-fit: cover;
  21. }
  22. .cover-overlay {
  23. position: absolute;
  24. top: 0;
  25. left: 0;
  26. right: 0;
  27. bottom: 0;
  28. background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
  29. }
  30. .cover-gradient {
  31. position: absolute;
  32. bottom: 0;
  33. left: 0;
  34. right: 0;
  35. height: 200rpx;
  36. background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  37. }
  38. .cover-category {
  39. position: absolute;
  40. top: 40rpx;
  41. right: 40rpx;
  42. background: rgba(52, 152, 219, 0.95);
  43. backdrop-filter: blur(10rpx);
  44. color: white;
  45. padding: 12rpx 28rpx;
  46. border-radius: 25rpx;
  47. font-size: 24rpx;
  48. font-weight: 600;
  49. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.2);
  50. z-index: 2;
  51. }
  52. /* 文章主体 */
  53. .article-body {
  54. background: white;
  55. border-radius: 40rpx 40rpx 0 0;
  56. margin-top: -40rpx;
  57. position: relative;
  58. z-index: 10;
  59. padding-bottom: 50rpx;
  60. }
  61. .title-section {
  62. padding: 50rpx 40rpx 40rpx;
  63. border-bottom: 1rpx solid #f1f5f9;
  64. }
  65. .article-title {
  66. font-size: 44rpx;
  67. font-weight: 800;
  68. color: #1e293b;
  69. line-height: 1.4;
  70. margin-bottom: 20rpx;
  71. letter-spacing: 0.5rpx;
  72. }
  73. .article-subtitle {
  74. font-size: 30rpx;
  75. color: #64748b;
  76. line-height: 1.6;
  77. margin-bottom: 40rpx;
  78. padding-bottom: 30rpx;
  79. border-bottom: 1rpx dashed #e2e8f0;
  80. }
  81. /* 专家信息 */
  82. .expert-info {
  83. display: flex;
  84. align-items: center;
  85. gap: 20rpx;
  86. margin-top: 30rpx;
  87. }
  88. .expert-avatar {
  89. width: 80rpx;
  90. height: 80rpx;
  91. border-radius: 50%;
  92. border: 3rpx solid white;
  93. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.1);
  94. }
  95. .expert-detail {
  96. flex: 1;
  97. }
  98. .expert-name {
  99. font-size: 28rpx;
  100. font-weight: 600;
  101. color: #1e293b;
  102. margin-bottom: 8rpx;
  103. }
  104. .publish-time {
  105. font-size: 24rpx;
  106. color: #94a3b8;
  107. }
  108. .view-count {
  109. display: flex;
  110. align-items: center;
  111. gap: 10rpx;
  112. background: rgba(226, 232, 240, 0.3);
  113. padding: 12rpx 20rpx;
  114. border-radius: 25rpx;
  115. font-size: 24rpx;
  116. color: #64748b;
  117. }
  118. .view-icon {
  119. width: 28rpx;
  120. height: 28rpx;
  121. opacity: 0.7;
  122. }
  123. /* 富文本内容 */
  124. .rich-content {
  125. padding: 40rpx;
  126. font-size: 32rpx;
  127. line-height: 1.8;
  128. color: #334155;
  129. }
  130. .rich-content h1,
  131. .rich-content h2,
  132. .rich-content h3 {
  133. color: #1e293b;
  134. margin: 40rpx 0 20rpx;
  135. font-weight: 700;
  136. }
  137. .rich-content h1 {
  138. font-size: 40rpx;
  139. }
  140. .rich-content h2 {
  141. font-size: 36rpx;
  142. }
  143. .rich-content h3 {
  144. font-size: 32rpx;
  145. }
  146. .rich-content p {
  147. margin-bottom: 30rpx;
  148. }
  149. .rich-content ul,
  150. .rich-content ol {
  151. margin: 20rpx 0 20rpx 40rpx;
  152. }
  153. .rich-content li {
  154. margin-bottom: 15rpx;
  155. position: relative;
  156. }
  157. .rich-content ul li:before {
  158. content: '•';
  159. color: #3498db;
  160. font-weight: bold;
  161. position: absolute;
  162. left: -25rpx;
  163. }
  164. .rich-content strong {
  165. color: #1e293b;
  166. font-weight: 700;
  167. }
  168. .rich-content a {
  169. color: #3498db;
  170. text-decoration: underline;
  171. }
  172. /* 加载中 */
  173. .loading-container {
  174. position: fixed;
  175. top: 0;
  176. left: 0;
  177. right: 0;
  178. bottom: 0;
  179. background: rgba(255, 255, 255, 0.95);
  180. display: flex;
  181. flex-direction: column;
  182. align-items: center;
  183. justify-content: center;
  184. z-index: 2000;
  185. }
  186. .loading-spinner {
  187. position: relative;
  188. width: 120rpx;
  189. height: 120rpx;
  190. margin-bottom: 40rpx;
  191. }
  192. .spinner-circle {
  193. position: absolute;
  194. top: 50%;
  195. left: 50%;
  196. transform: translate(-50%, -50%);
  197. width: 100%;
  198. height: 100%;
  199. border: 8rpx solid rgba(52, 152, 219, 0.1);
  200. border-radius: 50%;
  201. animation: spinnerRotate 2s linear infinite;
  202. }
  203. .spinner-circle.circle-2 {
  204. width: 80%;
  205. height: 80%;
  206. border-width: 6rpx;
  207. animation-delay: 0.2s;
  208. }
  209. .spinner-circle.circle-3 {
  210. width: 60%;
  211. height: 60%;
  212. border-width: 4rpx;
  213. animation-delay: 0.4s;
  214. }
  215. @keyframes spinnerRotate {
  216. 0% {
  217. transform: translate(-50%, -50%) rotate(0deg);
  218. }
  219. 100% {
  220. transform: translate(-50%, -50%) rotate(360deg);
  221. }
  222. }
  223. .loading-text {
  224. font-size: 28rpx;
  225. color: #64748b;
  226. letter-spacing: 1rpx;
  227. }
  228. /* 回到顶部 */
  229. .back-to-top {
  230. position: fixed;
  231. right: 40rpx;
  232. bottom: 160rpx;
  233. width: 80rpx;
  234. height: 80rpx;
  235. background: rgba(255, 255, 255, 0.95);
  236. backdrop-filter: blur(10rpx);
  237. border-radius: 50%;
  238. display: flex;
  239. align-items: center;
  240. justify-content: center;
  241. box-shadow: 0 8rpx 30rpx rgba(0, 0, 0, 0.15);
  242. border: 1rpx solid rgba(226, 232, 240, 0.8);
  243. transition: all 0.3s ease;
  244. z-index: 90;
  245. }
  246. .back-to-top:active {
  247. transform: scale(0.95);
  248. box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.2);
  249. }
  250. .top-icon {
  251. width: 36rpx;
  252. height: 36rpx;
  253. }
  254. /* 响应式调整 */
  255. @media screen and (max-width: 750rpx) {
  256. .article-cover {
  257. height: 400rpx;
  258. }
  259. .article-title {
  260. font-size: 38rpx;
  261. }
  262. .article-subtitle {
  263. font-size: 28rpx;
  264. }
  265. .rich-content {
  266. font-size: 30rpx;
  267. }
  268. .action-bar {
  269. padding: 0 30rpx;
  270. }
  271. .comment-btn {
  272. padding: 18rpx 30rpx;
  273. }
  274. }