category.wxss 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /* pages/category/category.wxss */
  2. page {
  3. height: 100vh;
  4. }
  5. .container {
  6. height: 100vh;
  7. display: flex;
  8. flex-direction: column;
  9. padding-bottom:0;
  10. }
  11. /* 顶部区域 */
  12. .header {
  13. padding: 20rpx 0;
  14. display: flex;
  15. justify-content: space-between;
  16. align-items: center;
  17. }
  18. /* 搜索框 */
  19. .search-box {
  20. display: flex;
  21. align-items: center;
  22. height: 70rpx;
  23. background-color: #fff;
  24. border-radius: 35rpx;
  25. padding: 0 15rpx;
  26. width: 420rpx;
  27. }
  28. .search-box icon {
  29. margin-right: 10rpx;
  30. }
  31. .search-box input {
  32. flex: 1;
  33. height: 100%;
  34. font-size: 28rpx;
  35. }
  36. .placeholder {
  37. color: #999;
  38. }
  39. /* 内容区域 */
  40. .content {
  41. flex: 1;
  42. display: flex;
  43. overflow: hidden;
  44. width: 100vw;
  45. padding-bottom: 20rpx;
  46. }
  47. /* 左侧分类列表 */
  48. .category-list {
  49. width: 200rpx;
  50. height: 100%;
  51. background-color: #f5f6fa;
  52. }
  53. .category-item {
  54. height: 100rpx;
  55. display: flex;
  56. align-items: center;
  57. justify-content: center;
  58. font-size: 28rpx;
  59. color: #666;
  60. position: relative;
  61. }
  62. .category-item.active {
  63. color: #007aff;
  64. font-weight: bold;
  65. background-color: #fff;
  66. }
  67. .category-item.active::before {
  68. content: '';
  69. position: absolute;
  70. left: 0;
  71. top: 50%;
  72. transform: translateY(-50%);
  73. width: 6rpx;
  74. height: 36rpx;
  75. background: linear-gradient(to bottom, #007aff, #af97ed);
  76. border-radius: 3rpx;
  77. }
  78. /* 右侧书籍列表 */
  79. .book-list {
  80. flex: 1;
  81. height: 100%;
  82. background-color: #fff;
  83. padding: 20rpx;
  84. }
  85. .book-item {
  86. display: flex;
  87. padding: 20rpx;
  88. border-bottom: 1rpx solid #f5f5f5;
  89. }
  90. .book-cover {
  91. width: 160rpx;
  92. height: 200rpx;
  93. border-radius: 12rpx;
  94. margin-right: 20rpx;
  95. }
  96. .book-info {
  97. flex: 1;
  98. display: flex;
  99. flex-direction: column;
  100. }
  101. .book-title {
  102. font-size: 30rpx;
  103. font-weight: bold;
  104. color: #333;
  105. margin-bottom: 15rpx;
  106. }
  107. .book-desc {
  108. font-size: 26rpx;
  109. color: #666;
  110. line-height: 1.5;
  111. display: -webkit-box;
  112. -webkit-line-clamp: 3;
  113. -webkit-box-orient: vertical;
  114. overflow: hidden;
  115. }
  116. .loading, .no-more, .empty {
  117. width: 100%;
  118. height: 80rpx;
  119. display: flex;
  120. align-items: center;
  121. justify-content: center;
  122. }
  123. .loading text, .no-more text, .empty text {
  124. font-size: 24rpx;
  125. color: #999;
  126. }
  127. .empty {
  128. height: 300rpx;
  129. }