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

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