list.wxss 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. /* pages/book/list.wxss */
  2. .container {
  3. height: 100vh;
  4. padding: 80rpx 0;
  5. box-sizing: border-box;
  6. overflow: hidden;
  7. }
  8. /* 顶部标题栏 */
  9. .header {
  10. padding: 30rpx;
  11. display: flex;
  12. position: relative;
  13. align-items: flex-start;
  14. justify-content: flex-start;
  15. width: 90vw;
  16. }
  17. .back-btn {
  18. width: 50rpx;
  19. height: 50rpx;
  20. display: flex;
  21. align-items: center;
  22. justify-content: center;
  23. margin-right: 30rpx;
  24. position: relative;
  25. }
  26. /* 返回箭头图标 */
  27. .icon-back {
  28. width: 100%;
  29. height: 100%;
  30. display: flex;
  31. align-items: center;
  32. justify-content: center;
  33. }
  34. .icon-back-arrow {
  35. width: 24rpx;
  36. height: 24rpx;
  37. border-top: 4rpx solid #333;
  38. border-left: 4rpx solid #333;
  39. transform: rotate(-45deg);
  40. margin-left: 8rpx;
  41. }
  42. .title {
  43. font-size: 36rpx;
  44. font-weight: bold;
  45. color: #333;
  46. flex: 1;
  47. text-align: center;
  48. margin-right: 80rpx; /* 为了保持标题居中,右侧留出与返回按钮相同的空间 */
  49. }
  50. /* 书籍列表 */
  51. .book-list {
  52. height: calc(100vh - 260rpx);
  53. padding: 20rpx;
  54. width: 720rpx;
  55. }
  56. .book-item {
  57. display: flex;
  58. padding: 30rpx;
  59. margin-bottom: 20rpx;
  60. background: #fff;
  61. border-radius: 12rpx;
  62. position: relative;
  63. }
  64. .book-cover {
  65. width: 160rpx;
  66. height: 200rpx;
  67. border-radius: 12rpx;
  68. margin-right: 20rpx;
  69. }
  70. .book-info {
  71. flex: 1;
  72. display: flex;
  73. flex-direction: column;
  74. justify-content: space-between;
  75. }
  76. .book-title {
  77. font-size: 32rpx;
  78. font-weight: bold;
  79. color: #333;
  80. margin-bottom: 16rpx;
  81. }
  82. .book-desc {
  83. font-size: 26rpx;
  84. color: #666;
  85. line-height: 1.6;
  86. display: -webkit-box;
  87. -webkit-line-clamp: 2;
  88. -webkit-box-orient: vertical;
  89. overflow: hidden;
  90. text-overflow: ellipsis;
  91. }
  92. .book-stats {
  93. font-size: 24rpx;
  94. color: #999;
  95. margin-top: 16rpx;
  96. }
  97. .book-tag {
  98. position: absolute;
  99. top: 30rpx;
  100. right: 30rpx;
  101. padding: 4rpx 12rpx;
  102. background: #ff6b6b;
  103. color: #fff;
  104. font-size: 22rpx;
  105. border-radius: 6rpx;
  106. }
  107. /* 加载更多 */
  108. .loading, .no-more {
  109. text-align: center;
  110. padding: 30rpx 0;
  111. }
  112. .loading text, .no-more text {
  113. font-size: 24rpx;
  114. color: #999;
  115. }