与牧同行-兽医端小程序
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.

486 lines
8.5 KiB

  1. /* 页面容器 */
  2. .home-container {
  3. width: 100%;
  4. min-height: 100vh;
  5. background: linear-gradient(180deg, #86D8D0 0%, #a9dfda 30%, #cfe9e7 60%, #ECF8F7 90%);
  6. padding-top: env(safe-area-inset-top);
  7. }
  8. /* 主要内容区域 */
  9. .box {
  10. width: 93%;
  11. margin: 0 auto;
  12. padding-bottom: 40rpx;
  13. }
  14. .orientation{
  15. display: flex;
  16. align-items: center;
  17. justify-content: space-between;
  18. margin-bottom: 10rpx;
  19. }
  20. /* 定位 */
  21. .orientation2 {
  22. display: flex;
  23. align-items: center;
  24. padding: 20rpx 0;
  25. color: #fff;
  26. font-weight: bold;
  27. font-size: 26rpx;
  28. }
  29. .orientation image {
  30. width: 40rpx;
  31. height: 40rpx;
  32. margin-right: 10rpx;
  33. }
  34. .orientation3{
  35. display: flex;
  36. align-items: center;
  37. color: #fff;
  38. }
  39. /* 轮播图区域 - 已修复 */
  40. .swiper-container {
  41. position: relative;
  42. border-radius: 20rpx;
  43. overflow: hidden;
  44. box-shadow: 0 10rpx 40rpx rgba(0, 0, 0, 0.1);
  45. animation: scaleIn 0.6s ease-out 0.4s both;
  46. }
  47. @keyframes scaleIn {
  48. from {
  49. opacity: 0;
  50. transform: scale(0.95);
  51. }
  52. to {
  53. opacity: 1;
  54. transform: scale(1);
  55. }
  56. }
  57. .custom-swiper {
  58. border-radius: 20rpx;
  59. }
  60. .swiper-item {
  61. position: relative;
  62. height: 360rpx;
  63. overflow: hidden;
  64. border-radius: 20rpx;
  65. transition: transform 0.5s ease;
  66. }
  67. .swiper-item.active {
  68. transform: scale(1.02);
  69. }
  70. .swiper-image {
  71. width: 100%;
  72. height: 100%;
  73. transition: transform 8s ease;
  74. }
  75. .swiper-mask {
  76. position: absolute;
  77. top: 0;
  78. left: 0;
  79. right: 0;
  80. bottom: 0;
  81. background: linear-gradient(to right, rgba(0, 0, 0, 0.3), transparent 50%);
  82. }
  83. .swiper-content {
  84. position: absolute;
  85. bottom: 60rpx;
  86. left: 40rpx;
  87. z-index: 2;
  88. max-width: 60%;
  89. }
  90. .swiper-tag {
  91. display: inline-block;
  92. padding: 6rpx 20rpx;
  93. background: rgba(76, 175, 80, 0.9);
  94. color: white;
  95. font-size: 20rpx;
  96. border-radius: 20rpx;
  97. margin-bottom: 16rpx;
  98. backdrop-filter: blur(10rpx);
  99. }
  100. .swiper-title {
  101. display: block;
  102. font-size: 36rpx;
  103. font-weight: bold;
  104. color: #FFFFFF;
  105. margin-bottom: 8rpx;
  106. text-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.3);
  107. line-height: 1.4;
  108. }
  109. .swiper-desc {
  110. display: block;
  111. font-size: 24rpx;
  112. color: rgba(255, 255, 255, 0.9);
  113. text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.2);
  114. }
  115. .swiper-gradient {
  116. position: absolute;
  117. bottom: 0;
  118. left: 0;
  119. right: 0;
  120. height: 120rpx;
  121. background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
  122. }
  123. .custom-indicator {
  124. position: absolute;
  125. bottom: 30rpx;
  126. right: 30rpx;
  127. display: flex;
  128. align-items: center;
  129. z-index: 3;
  130. }
  131. .indicator-dot {
  132. width: 12rpx;
  133. height: 12rpx;
  134. border-radius: 50%;
  135. background: rgba(255, 255, 255, 0.5);
  136. margin: 0 6rpx;
  137. transition: all 0.3s ease;
  138. }
  139. .indicator-dot.active {
  140. width: 40rpx;
  141. background: #96DBD4;
  142. border-radius: 6rpx;
  143. }
  144. /* 卡片类型 */
  145. .kap {
  146. animation: kapIn 0.5s ease-out 0.5s both;
  147. }
  148. @keyframes kapIn {
  149. from {
  150. opacity: 0;
  151. }
  152. to {
  153. opacity: 1;
  154. }
  155. }
  156. .card {
  157. width: 100%;
  158. display: grid;
  159. grid-template-columns: 1.1fr 2fr;
  160. column-gap: 20rpx;
  161. margin: 20rpx 0;
  162. }
  163. .card2 {
  164. background-color: #F8918C;
  165. border-radius: 25rpx;
  166. padding: 30rpx 20rpx 120rpx;
  167. }
  168. .card2 view:nth-child(1) {
  169. font-size: 38rpx;
  170. color: #fff;
  171. font-weight: bold;
  172. letter-spacing: 0.1em;
  173. }
  174. .card2_1 {
  175. margin: 10rpx 0;
  176. font-size: 26rpx;
  177. color: #FDE8E1;
  178. }
  179. .card3 {
  180. display: grid;
  181. grid-template-rows: 1fr 1fr;
  182. row-gap: 20rpx;
  183. }
  184. .card3>view {
  185. border-radius: 25rpx;
  186. padding: 0 0 0 20rpx;
  187. }
  188. .card3_1 {
  189. background-color: #5EBEB8;
  190. }
  191. .card3_1 view:last-child {
  192. color: #D9F0EE;
  193. }
  194. .card3_2 {
  195. background-color: #E9B770;
  196. }
  197. .card3_2 view:last-child {
  198. color: #F4E8DB;
  199. }
  200. .card3_kp view:first-child {
  201. font-size: 38rpx;
  202. color: #fff;
  203. margin: 30rpx 0 10rpx 0;
  204. }
  205. .card3_kp view:last-child {
  206. font-size: 26rpx;
  207. }
  208. /* 文章发布-视频培训 */
  209. .article1_1{
  210. width:100%;
  211. box-sizing: border-box;
  212. background-color: #fff;
  213. border-radius: 20rpx;
  214. display: flex;
  215. align-items: center;
  216. justify-content: space-between;
  217. padding: 20rpx 30rpx;
  218. margin-top: 30rpx;
  219. }
  220. .article2 view:first-child{
  221. font-weight: bold;
  222. }
  223. .article2 view:last-child{
  224. color: #C5C6CC;
  225. font-size: 24rpx;
  226. margin-top: 20rpx;
  227. }
  228. .article3 image{
  229. width: 100rpx;
  230. }
  231. /* 用户提问板块 */
  232. .user-question-section {
  233. background: #FFFFFF;
  234. border-radius: 24rpx;
  235. padding: 32rpx;
  236. margin: 40rpx 0 20rpx;
  237. box-shadow: 0 8rpx 40rpx rgba(0, 0, 0, 0.06);
  238. animation: slideUp 0.8s ease-out 0.8s both;
  239. }
  240. @keyframes slideUp {
  241. from {
  242. opacity: 0;
  243. transform: translateY(60rpx);
  244. }
  245. to {
  246. opacity: 1;
  247. transform: translateY(0);
  248. }
  249. }
  250. /* 标题区域 */
  251. .question-header {
  252. display: flex;
  253. justify-content: space-between;
  254. align-items: center;
  255. margin-bottom: 40rpx;
  256. padding-bottom: 24rpx;
  257. border-bottom: 1px solid rgba(150, 219, 212, 0.3);
  258. }
  259. .question-title {
  260. display: flex;
  261. flex-direction: column;
  262. }
  263. .title-text {
  264. font-size: 38rpx;
  265. font-weight: bold;
  266. color: #7ad1cb;
  267. margin-bottom: 8rpx;
  268. position: relative;
  269. padding-left: 20rpx;
  270. }
  271. .title-text::before {
  272. content: '';
  273. position: absolute;
  274. left: 0;
  275. top: 50%;
  276. transform: translateY(-50%);
  277. width: 8rpx;
  278. height: 32rpx;
  279. background: #60C0B9;
  280. border-radius: 4rpx;
  281. }
  282. .title-text1_1 {
  283. font-size: 38rpx;
  284. font-weight: bold;
  285. color: #7499C8;
  286. margin-bottom: 8rpx;
  287. position: relative;
  288. padding-left: 20rpx;
  289. }
  290. .title-text1_1::before {
  291. content: '';
  292. position: absolute;
  293. left: 0;
  294. top: 50%;
  295. transform: translateY(-50%);
  296. width: 8rpx;
  297. height: 32rpx;
  298. background: #79b2d3;
  299. border-radius: 4rpx;
  300. }
  301. .title-sub {
  302. font-size: 24rpx;
  303. color: #999;
  304. padding-left: 20rpx;
  305. }
  306. .view-all {
  307. display: flex;
  308. align-items: center;
  309. font-size: 26rpx;
  310. color: #60C0B9;
  311. padding: 12rpx 24rpx;
  312. background: rgba(96, 192, 185, 0.1);
  313. border-radius: 30rpx;
  314. transition: all 0.3s ease;
  315. }
  316. .view-all:active {
  317. background: rgba(96, 192, 185, 0.2);
  318. transform: scale(0.98);
  319. }
  320. .view-all1_1{
  321. display: flex;
  322. align-items: center;
  323. font-size: 26rpx;
  324. color: #608ac0;
  325. padding: 12rpx 24rpx;
  326. background: rgba(96, 192, 185, 0.1);
  327. border-radius: 30rpx;
  328. transition: all 0.3s ease;
  329. }
  330. .view-all1_1:active {
  331. background: rgba(131, 158, 199, 0.2);
  332. transform: scale(0.98);
  333. }
  334. /* 问题元信息 */
  335. .question-meta {
  336. display: flex;
  337. justify-content: space-between;
  338. align-items: flex-start;
  339. margin-bottom: 28rpx;
  340. }
  341. .question-tag {
  342. flex: 1;
  343. display: flex;
  344. align-items: flex-start;
  345. gap: 12rpx;
  346. }
  347. .tag-text {
  348. font-size: 30rpx;
  349. color: #333;
  350. line-height: 1.5;
  351. font-weight: 500;
  352. display: -webkit-box;
  353. -webkit-box-orient: vertical;
  354. -webkit-line-clamp: 2;
  355. overflow: hidden;
  356. }
  357. /* 用户信息 */
  358. .question-info {
  359. display: flex;
  360. justify-content: space-between;
  361. align-items: center;
  362. margin-bottom: 28rpx;
  363. padding-bottom: 20rpx;
  364. border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
  365. }
  366. .user-info {
  367. display: flex;
  368. align-items: center;
  369. gap: 16rpx;
  370. }
  371. .user-avatar {
  372. width: 64rpx;
  373. height: 64rpx;
  374. border-radius: 50%;
  375. background: #E0F2F1;
  376. border: 2rpx solid #60C0B9;
  377. }
  378. .user-detail {
  379. display: flex;
  380. flex-direction: column;
  381. }
  382. .user-name {
  383. font-size: 26rpx;
  384. font-weight: 500;
  385. color: #333;
  386. margin-bottom: 6rpx;
  387. }
  388. .time-info {
  389. font-size: 22rpx;
  390. color: #999;
  391. background: rgba(0, 0, 0, 0.04);
  392. padding: 6rpx 16rpx;
  393. border-radius: 16rpx;
  394. }
  395. .post-footer {
  396. display: flex;
  397. align-items: center;
  398. justify-content: flex-end;
  399. }
  400. .post-meta {
  401. display: flex;
  402. align-items: center;
  403. gap: 25rpx;
  404. }
  405. .meta-item {
  406. display: flex;
  407. align-items: center;
  408. gap: 8rpx;
  409. }
  410. .meta-icon {
  411. width: 28rpx;
  412. height: 28rpx;
  413. opacity: 0.5;
  414. }
  415. .meta-count {
  416. font-size: 26rpx;
  417. font-weight: 600;
  418. color: #64748b;
  419. }