index.wxss 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. /**index.wxss**/
  2. page {
  3. font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica,
  4. "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  5. color: #333;
  6. min-height: 100vh;
  7. }
  8. .container {
  9. width: 100%;
  10. min-height: 100vh;
  11. padding-bottom: 30rpx;
  12. box-sizing: border-box;
  13. position: relative;
  14. }
  15. /* 状态栏占位 */
  16. .status-bar {
  17. height: 40rpx;
  18. width: 100%;
  19. }
  20. /* 头部区域 */
  21. .header {
  22. display: flex;
  23. justify-content: space-between;
  24. align-items: center;
  25. padding: 0 30rpx;
  26. height: 100rpx;
  27. }
  28. .avatar {
  29. width: 60rpx;
  30. height: 60rpx;
  31. border-radius: 50%;
  32. overflow: hidden;
  33. }
  34. .avatar image {
  35. width: 100%;
  36. height: 100%;
  37. }
  38. .icon-more,
  39. .icon-search {
  40. width: 50rpx;
  41. height: 50rpx;
  42. margin-left: 30rpx;
  43. }
  44. .icon-more image,
  45. .icon-search image {
  46. width: 100%;
  47. height: 100%;
  48. }
  49. .main-wrapper {
  50. width: 100vw;
  51. background: linear-gradient(to right,
  52. rgba(247, 244, 241, 1) 0%,
  53. rgba(247, 244, 241, 0.8) 20%,
  54. rgba(247, 244, 241, 0.6) 40%,
  55. rgba(247, 244, 241, 0.4) 60%,
  56. rgba(247, 244, 241, 0.2) 80%,
  57. rgba(247, 244, 241, 0) 100%
  58. );
  59. position: relative;
  60. overflow: hidden;
  61. }
  62. /* 性别和搜索 */
  63. .tab-search {
  64. padding: 30rpx 30rpx 0 30rpx;
  65. display: flex;
  66. justify-content: space-between;
  67. align-items: flex-start;
  68. }
  69. .gender-tabs {
  70. display: flex;
  71. margin-bottom: 20rpx;
  72. }
  73. .tab {
  74. font-size: 30rpx;
  75. margin-right: 40rpx;
  76. padding: 10rpx 0;
  77. position: relative;
  78. color: #999;
  79. }
  80. .tab.active {
  81. color: #333;
  82. font-weight: bold;
  83. }
  84. .tab.active:after {
  85. content: "";
  86. position: absolute;
  87. bottom: 0;
  88. left: 50%;
  89. transform: translateX(-50%);
  90. width: 40rpx;
  91. height: 6rpx;
  92. background: linear-gradient(to right, #007aff, #af97ed);
  93. border-radius: 3rpx;
  94. }
  95. /* 搜索框 */
  96. .search-box {
  97. display: flex;
  98. align-items: center;
  99. height: 70rpx;
  100. background-color: #fff;
  101. border-radius: 35rpx;
  102. padding: 0 15rpx;
  103. width: 420rpx;
  104. }
  105. .search-box icon {
  106. margin-right: 10rpx;
  107. }
  108. .search-box input {
  109. flex: 1;
  110. height: 100%;
  111. font-size: 28rpx;
  112. color: #999;
  113. }
  114. /* 主Banner */
  115. .main-banner {
  116. width: 100%;
  117. height: 240rpx;
  118. padding: 20rpx 30rpx;
  119. box-sizing: border-box;
  120. margin-bottom: 50rpx;
  121. }
  122. .main-banner image {
  123. width: 100%;
  124. height: 240rpx;
  125. border-radius: 20rpx;
  126. }
  127. /* 功能区 */
  128. .feature-section {
  129. display: flex;
  130. justify-content: space-around;
  131. padding: 30rpx;
  132. background-color: #fff;
  133. border-radius: 20rpx;
  134. margin: 20rpx 30rpx 30rpx;
  135. box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.05);
  136. }
  137. .feature-item {
  138. display: flex;
  139. flex-direction: column;
  140. align-items: center;
  141. }
  142. .feature-item image {
  143. width: 80rpx;
  144. height: 80rpx;
  145. margin-bottom: 10rpx;
  146. }
  147. .feature-item text {
  148. font-size: 24rpx;
  149. color: #666;
  150. }
  151. /* 公共区域标题 */
  152. .section-header {
  153. display: flex;
  154. justify-content: space-between;
  155. align-items: center;
  156. padding: 30rpx;
  157. }
  158. .section-header .title {
  159. font-size: 34rpx;
  160. font-weight: bold;
  161. }
  162. .section-header .more {
  163. font-size: 24rpx;
  164. color: #999;
  165. }
  166. /* 主编推荐 */
  167. .recommend-section {
  168. background-color: #fff;
  169. margin: 5rpx 30rpx;
  170. border-radius: 20rpx;
  171. width: 690rpx;
  172. overflow:hidden;
  173. }
  174. .recommend-main {
  175. padding: 0 30rpx;
  176. }
  177. .recommend-large {
  178. display: flex;
  179. padding-bottom: 30rpx;
  180. border-bottom: 1rpx solid #eee;
  181. }
  182. .recommend-large image {
  183. width: 190rpx;
  184. height: 250rpx;
  185. border-radius: 10rpx;
  186. }
  187. .book-info {
  188. flex: 1;
  189. margin-left: 20rpx;
  190. display: flex;
  191. flex-direction: column;
  192. justify-content: space-between;
  193. }
  194. .book-title {
  195. font-size: 30rpx;
  196. font-weight: bold;
  197. margin-bottom: 10rpx;
  198. }
  199. .book-desc {
  200. font-size: 24rpx;
  201. color: #666;
  202. line-height: 1.5;
  203. display: -webkit-box;
  204. -webkit-line-clamp: 3;
  205. -webkit-box-orient: vertical;
  206. overflow: hidden;
  207. text-overflow: ellipsis;
  208. }
  209. .book-stats {
  210. font-size: 24rpx;
  211. color: #007aff;
  212. }
  213. .recommend-books {
  214. display: flex;
  215. padding: 30rpx;
  216. justify-content: space-between;
  217. }
  218. .book-item {
  219. width: 22%;
  220. display: flex;
  221. flex-direction: column;
  222. align-items: center;
  223. }
  224. .book-item image {
  225. width: 125rpx;
  226. height: 180rpx;
  227. border-radius: 10rpx;
  228. margin-bottom: 10rpx;
  229. }
  230. .book-item text {
  231. font-size: 24rpx;
  232. color: #333;
  233. text-align: center;
  234. overflow: hidden;
  235. text-overflow: ellipsis;
  236. white-space: nowrap;
  237. width: 100%;
  238. }
  239. /* 全网热推 */
  240. .hot-section {
  241. background-color: #fff;
  242. margin: 30rpx 30rpx 0;
  243. border-radius: 20rpx;
  244. }
  245. .hot-books {
  246. padding: 0 30rpx 30rpx;
  247. }
  248. .hot-book-item {
  249. display: flex;
  250. margin-bottom: 30rpx;
  251. }
  252. .hot-book-item:last-child {
  253. margin-bottom: 0;
  254. }
  255. .hot-book-item image {
  256. width: 200rpx;
  257. height: 270rpx;
  258. border-radius: 10rpx;
  259. }
  260. .hot-book-info {
  261. flex: 1;
  262. margin-left: 20rpx;
  263. display: flex;
  264. flex-direction: column;
  265. justify-content: space-between;
  266. }
  267. .hot-book-title {
  268. font-size: 30rpx;
  269. font-weight: bold;
  270. margin-bottom: 10rpx;
  271. }
  272. .hot-book-desc {
  273. font-size: 24rpx;
  274. color: #666;
  275. line-height: 1.5;
  276. display: -webkit-box;
  277. -webkit-line-clamp: 3;
  278. -webkit-box-orient: vertical;
  279. overflow: hidden;
  280. text-overflow: ellipsis;
  281. }
  282. .hot-book-stats {
  283. font-size: 24rpx;
  284. color: #999;
  285. }
  286. /* 强力推荐 */
  287. .strong-recommend {
  288. background-color: #fff;
  289. margin: 30rpx 30rpx;
  290. border-radius: 20rpx;
  291. width: 690rpx;
  292. box-sizing: border-box;
  293. }
  294. .strong-books {
  295. display: flex;
  296. padding: 0 30rpx 30rpx;
  297. justify-content: space-between;
  298. }
  299. .strong-book-item {
  300. width: 22%;
  301. display: flex;
  302. flex-direction: column;
  303. align-items: center;
  304. }
  305. .strong-book-item image {
  306. width: 100%;
  307. height: 220rpx;
  308. border-radius: 10rpx;
  309. margin-bottom: 10rpx;
  310. }
  311. .strong-book-item text {
  312. font-size: 24rpx;
  313. color: #333;
  314. text-align: center;
  315. overflow: hidden;
  316. text-overflow: ellipsis;
  317. white-space: nowrap;
  318. width: 100%;
  319. }
  320. /* 底部Tab导航 */
  321. .tab-bar {
  322. position: fixed;
  323. bottom: 0;
  324. left: 0;
  325. width: 100%;
  326. height: 100rpx;
  327. display: flex;
  328. background-color: #fff;
  329. border-top: 1rpx solid #eee;
  330. z-index: 100;
  331. }
  332. .tab-item {
  333. flex: 1;
  334. display: flex;
  335. flex-direction: column;
  336. align-items: center;
  337. justify-content: center;
  338. }
  339. .tab-item image {
  340. width: 50rpx;
  341. height: 50rpx;
  342. margin-bottom: 6rpx;
  343. }
  344. .tab-item text {
  345. font-size: 22rpx;
  346. color: #999;
  347. }
  348. .tab-item.active text {
  349. color: #ff5252;
  350. }
  351. /* 登录加载遮罩 */
  352. .loading-mask {
  353. position: fixed;
  354. top: 0;
  355. left: 0;
  356. right: 0;
  357. bottom: 0;
  358. background: rgba(255, 255, 255, 0.9);
  359. display: flex;
  360. align-items: center;
  361. justify-content: center;
  362. z-index: 9999;
  363. }
  364. .loading-content {
  365. display: flex;
  366. flex-direction: column;
  367. align-items: center;
  368. }
  369. .loading-icon {
  370. width: 80rpx;
  371. height: 80rpx;
  372. margin-bottom: 20rpx;
  373. border: 6rpx solid #f3f3f3;
  374. border-top: 6rpx solid #07c160;
  375. border-radius: 50%;
  376. animation: spin 1s linear infinite;
  377. }
  378. .loading-content text {
  379. font-size: 28rpx;
  380. color: #666;
  381. }
  382. @keyframes spin {
  383. 0% { transform: rotate(0deg); }
  384. 100% { transform: rotate(360deg); }
  385. }
  386. /* 最近阅读悬浮按钮样式 */
  387. .recent-book-float {
  388. position: fixed;
  389. left: 20rpx;
  390. bottom: 80rpx;
  391. z-index: 999;
  392. width: 160rpx;
  393. height: 227rpx;
  394. border-radius: 12rpx;
  395. overflow: hidden;
  396. box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.15);
  397. background-color: #B07B46;
  398. display: flex;
  399. flex-direction: column;
  400. justify-content: center;
  401. align-items: center;
  402. }
  403. .recent-book-float image {
  404. width: 145rpx;
  405. height: 170rpx;
  406. border-radius: 12rpx;
  407. }
  408. .recent-book-label {
  409. width: 100%;
  410. height: 30rpx;
  411. font-size: 24rpx;
  412. color: #ffffff;
  413. background-color: #B07B46;
  414. text-align: center;
  415. margin-top: 8rpx;
  416. margin-bottom: 8rpx;
  417. }