test3.component.html 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>训练项目</title>
  7. <link href="https://cdn.jsdelivr.net/npm/@ionic/core/css/ionic.bundle.css" rel="stylesheet">
  8. <style>
  9. body {
  10. margin: 0;
  11. padding: 0;
  12. font-family: Arial, sans-serif;
  13. height: 100vh; /* 确保整个视口高度 */
  14. overflow-y: auto; /* 允许垂直滚动 */
  15. background-color: #f0f0f0; /* 背景颜色 */
  16. }
  17. .header {
  18. background-color: #4CAF50; /* 标题背景颜色 */
  19. color: white;
  20. text-align: center;
  21. padding: 20px 0; /* 上下内边距 */
  22. box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* 阴影效果 */
  23. }
  24. .header h1 {
  25. margin: 0; /* 去掉默认的 margin */
  26. font-size: 2em; /* 标题字体大小 */
  27. }
  28. .training-container {
  29. display: flex;
  30. flex-direction: column; /* 垂直排列 */
  31. align-items: center; /* 居中对齐 */
  32. padding: 20px;
  33. }
  34. .training-card {
  35. background-color: white; /* 卡片背景颜色 */
  36. border: 1px solid #ddd;
  37. border-radius: 8px;
  38. padding: 15px;
  39. width: 80%; /* 根据需要调整宽度 */
  40. margin: 10px 0; /* 卡片之间的间距 */
  41. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* 增强阴影效果 */
  42. transition: transform 0.2s; /* 添加过渡效果 */
  43. }
  44. .training-card:hover {
  45. transform: translateY(-5px); /* 悬停时上移效果 */
  46. }
  47. .training-card h2 {
  48. font-size: 1.5em;
  49. color: #333;
  50. margin-bottom: 10px; /* 卡片标题与内容之间的间距 */
  51. }
  52. .training-card img {
  53. max-width: 100%;
  54. height: auto;
  55. border-radius: 4px;
  56. }
  57. .training-card p {
  58. font-size: 1em;
  59. color: #666;
  60. }
  61. .training-card button {
  62. background-color: #007bff; /* 按钮颜色 */
  63. color: white;
  64. border: none;
  65. border-radius: 4px;
  66. padding: 10px 15px;
  67. cursor: pointer;
  68. margin-top: 10px;
  69. transition: background-color 0.3s; /* 按钮过渡效果 */
  70. }
  71. .training-card button:hover {
  72. background-color: #0056b3; /* 悬停效果 */
  73. }
  74. </style>
  75. </head>
  76. <body>
  77. <div class="header">
  78. <h1>训练记录</h1>
  79. </div>
  80. <div class="training-container">
  81. <div class="training-card">
  82. <h2>运球训练</h2>
  83. <img src="assets/tab4.img/1.jpg" alt="运球训练图片">
  84. <button routerLink="/tab2" (click)="gototab5()">继续训练</button>
  85. </div>
  86. <div class="training-card">
  87. <h2>脚步训练</h2>
  88. <img src="assets/tab4.img/2.jpg" alt="脚步训练图片">
  89. <button routerLink="/tab2" (click)="gototab5()">继续训练</button>
  90. </div>
  91. <div class="training-card">
  92. <h2>投篮训练</h2>
  93. <img src="assets/tab4.img/3.jpg" alt="投篮训练图片">
  94. <button routerLink="/tab2" (click)="gototab5()">继续训练</button>
  95. </div>
  96. <!-- 添加返回按钮 -->
  97. <ion-button slot="end" (click)="gototab4()">返回</ion-button>
  98. </div>
  99. <script src="https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic.js"></script>
  100. </body>
  101. </html>