tab1.page.scss 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. ion-header {
  2. background-color: #ffffff; // 设置头部背景色
  3. color: white; // 设置头部文字颜色
  4. }
  5. ion-title {
  6. flex: 1; // 使标题占据可用空间
  7. text-align: left; // 确保文字左对齐
  8. margin-left: 16px; // 左侧边距,可以根据需要调整
  9. margin-top: 5px;
  10. }
  11. ion-card {
  12. margin: 10px; // 设置卡片之间的间距
  13. border-radius: 10px; // 设置卡片圆角
  14. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); // 添加阴影效果
  15. }
  16. ion-card-header {
  17. background-color: #d8e5fa; // 设置头部背景色
  18. color: white; // 设置头部文字颜色
  19. }
  20. ion-card-title {
  21. font-size: 1.2em; // 设置卡片标题字体大小
  22. font-weight: bold; // 设置卡片标题字体加粗
  23. }
  24. ion-item {
  25. --ion-item-background: transparent; // 设置列表项背景透明
  26. }
  27. ion-label {
  28. color: #333; // 设置标签文字颜色
  29. }
  30. ion-button {
  31. --background: #3880ff; // 设置按钮背景色
  32. --color: white; // 设置按钮文字颜色
  33. margin-top: 10px; // 设置按钮与上方内容的间距
  34. border-radius: 5px; // 设置按钮圆角
  35. }
  36. ion-avatar {
  37. border-radius: 50%; // 设置头像圆形
  38. width: 50px; // 设置头像宽度
  39. height: 50px; // 设置头像高度
  40. }
  41. h2 {
  42. font-size: 1em; // 设置二级标题字体大小
  43. margin: 0; // 去掉默认外边距
  44. }
  45. p {
  46. font-size: 0.9em; // 设置段落字体大小
  47. color: #666; // 设置段落文字颜色
  48. }
  49. ion-list {
  50. padding: 0; // 去掉列表内边距
  51. }
  52. ion-card-content {
  53. padding: 10px; // 设置卡片内容内边距
  54. }
  55. ion-content {
  56. --background: #f9f9f9; /* 设置内容背景色 */
  57. }
  58. // 轮播图部分
  59. .banner-section {
  60. padding: 16px var(--page-padding);
  61. background: white;
  62. .banner-container {
  63. position: relative;
  64. border-radius: 12px;
  65. overflow: hidden;
  66. height: 250px;
  67. user-select: none;
  68. touch-action: pan-y pinch-zoom;
  69. .banner-img-container {
  70. display: flex;
  71. height: 100%;
  72. transition: transform 0.3s ease-in-out;
  73. img {
  74. min-width: 100%;
  75. height: 250px;
  76. object-fit: cover;
  77. pointer-events: none;
  78. }
  79. }
  80. .banner-indicators {
  81. position: absolute;
  82. bottom: 12px;
  83. left: 50%;
  84. transform: translateX(-50%);
  85. display: flex;
  86. gap: 8px;
  87. z-index: 2;
  88. .indicator {
  89. width: 6px;
  90. height: 6px;
  91. border-radius: 50%;
  92. background: rgba(255, 255, 255, 0.5);
  93. transition: all 0.3s;
  94. cursor: pointer;
  95. &.active {
  96. width: 18px;
  97. border-radius: 3px;
  98. background: white;
  99. }
  100. }
  101. }
  102. .banner-arrows {
  103. position: absolute;
  104. top: 50%;
  105. left: 0;
  106. right: 0;
  107. transform: translateY(-50%);
  108. display: flex;
  109. justify-content: space-between;
  110. padding: 0 16px;
  111. pointer-events: none;
  112. .arrow-btn {
  113. width: 32px;
  114. height: 32px;
  115. border-radius: 50%;
  116. background: rgba(0, 0, 0, 0.3);
  117. border: none;
  118. color: white;
  119. display: flex;
  120. align-items: center;
  121. justify-content: center;
  122. cursor: pointer;
  123. pointer-events: auto;
  124. transition: all 0.3s;
  125. &:hover {
  126. background: rgba(0, 0, 0, 0.5);
  127. }
  128. ion-icon {
  129. font-size: 20px;
  130. }
  131. }
  132. }
  133. }
  134. }
  135. // 最近在学部分
  136. .recent-learning {
  137. padding: 16px var(--page-padding);
  138. background: white;
  139. margin-top: 8px;
  140. .section-header {
  141. display: flex;
  142. justify-content: space-between;
  143. align-items: center;
  144. margin-bottom: 16px;
  145. h2 {
  146. margin: 0;
  147. font-size: 18px;
  148. font-weight: 600;
  149. color: #333;
  150. }
  151. .view-all {
  152. display: flex;
  153. align-items: center;
  154. gap: 4px;
  155. color: #666;
  156. font-size: 14px;
  157. ion-icon {
  158. font-size: 16px;
  159. }
  160. }
  161. }
  162. }
  163. .learning-cards {
  164. display: grid;
  165. grid-template-columns: repeat(4, 1fr);
  166. gap: 16px;
  167. overflow-x: auto;
  168. padding-bottom: 8px;
  169. .learning-card {
  170. border-radius: 8px;
  171. overflow: hidden;
  172. box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  173. transition: all 0.3s;
  174. &:hover {
  175. transform: translateY(-2px);
  176. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  177. }
  178. img {
  179. width: 100%;
  180. height: 120px;
  181. object-fit: cover;
  182. }
  183. h3 {
  184. margin: 8px;
  185. font-size: 14px;
  186. font-weight: 500;
  187. color: #333;
  188. text-align: center;
  189. }
  190. }
  191. }
  192. // 功能导航区
  193. .features-grid {
  194. padding: 16px var(--page-padding);
  195. background: white;
  196. .features-row {
  197. display: grid;
  198. grid-template-columns: repeat(5, 1fr);
  199. gap: 16px;
  200. margin-bottom: 20px;
  201. &:last-child {
  202. margin-bottom: 0;
  203. }
  204. }
  205. .feature-item {
  206. display: flex;
  207. flex-direction: column;
  208. align-items: center;
  209. gap: 8px;
  210. padding: 12px 8px;
  211. border-radius: 8px;
  212. transition: all 0.3s;
  213. &:active {
  214. background: rgba(182, 77, 36, 0.1);
  215. }
  216. ion-icon {
  217. font-size: 28px;
  218. color: #4CAF50; // 主题色,可以根据需要调整
  219. margin-bottom: 8px;
  220. transition: all 0.3s ease;
  221. }
  222. &:hover {
  223. transform: translateY(-3px);
  224. ion-icon {
  225. transform: scale(1.1);
  226. }
  227. }
  228. // 为不同类别设置不同的图标颜色
  229. &:nth-child(1) ion-icon { color: #FF5722; } // 基础训练
  230. &:nth-child(2) ion-icon { color: #2196F3; } // 体能提升
  231. &:nth-child(3) ion-icon { color: #4CAF50; } // 防守技巧
  232. &:nth-child(4) ion-icon { color: #FFC107; } // 进攻战术
  233. &:nth-child(5) ion-icon { color: #9C27B0; } // 投篮技巧
  234. span {
  235. font-size: 12px;
  236. color: #333;
  237. }
  238. }
  239. }