page-test.component.scss 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. /* 变量定义 */
  2. $primary-color: #3880ff; // 主色调
  3. $secondary-color: #f4f4f4; // 辅助色调
  4. $accent-color: #ff4081; // 强调色
  5. $font-family: 'Helvetica Neue', Arial, sans-serif;
  6. /* 主样式 */
  7. ion-header {
  8. background-color: $primary-color;
  9. color: white;
  10. ion-toolbar {
  11. display: flex;
  12. justify-content: center;
  13. align-items: center;
  14. ion-title {
  15. font-size: 24px;
  16. font-weight: bold;
  17. }
  18. }
  19. }
  20. ion-content {
  21. padding: 16px;
  22. background-color: $secondary-color;
  23. /* 自定义段落样式 */
  24. .custom-segment {
  25. display: flex;
  26. justify-content: space-around;
  27. margin-bottom: 16px;
  28. .nav-button {
  29. flex: 1;
  30. text-align: center;
  31. padding: 10px;
  32. font-size: 16px;
  33. color: $primary-color;
  34. &.activated {
  35. background-color: $primary-color;
  36. color: white;
  37. }
  38. }
  39. }
  40. /* 输入框和显示区域 */
  41. .info-section {
  42. background-color: white;
  43. border-radius: 8px;
  44. padding: 16px;
  45. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  46. margin-bottom: 16px;
  47. .input-row {
  48. display: flex;
  49. justify-content: center; /* 水平居中 */
  50. margin-bottom: 16px;
  51. .input-group {
  52. width: 60%; /* 控制输入框的宽度为60% */
  53. max-width: 300px; /* 限制最大宽度 */
  54. display: flex;
  55. flex-direction: column; /* 垂直排列标签和输入框 */
  56. align-items: center; /* 内容居中对齐 */
  57. label {
  58. font-weight: bold;
  59. margin-bottom: 4px;
  60. display: block;
  61. text-align: center; /* 标签居中 */
  62. }
  63. .input-box {
  64. width: 100%;
  65. padding: 8px;
  66. border: 1px solid #ccc;
  67. border-radius: 4px;
  68. }
  69. .unit {
  70. font-size: 14px;
  71. margin-top: 4px;
  72. }
  73. }
  74. }
  75. }
  76. /* BMI输出框 */
  77. .textarea-section {
  78. background-color: white;
  79. border-radius: 8px;
  80. padding: 16px;
  81. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  82. margin-bottom: 16px;
  83. .textarea-input {
  84. width: 100%;
  85. height: 120px;
  86. border: 1px solid #ccc;
  87. border-radius: 4px;
  88. padding: 8px;
  89. resize: none;
  90. }
  91. }
  92. /* 按钮 */
  93. .analysis-button {
  94. width: 100%;
  95. margin-top: 16px;
  96. background-color: $primary-color;
  97. color: white;
  98. padding: 12px;
  99. border-radius: 4px;
  100. font-size: 16px;
  101. transition: background-color 0.3s;
  102. &.generating {
  103. background-color: $accent-color;
  104. }
  105. &:hover {
  106. background-color: darken($primary-color, 10%);
  107. }
  108. }
  109. /* 内容框 */
  110. .bigbox1 {
  111. background-color: white;
  112. border-radius: 8px;
  113. padding: 16px;
  114. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  115. margin-top: 16px;
  116. .content-style {
  117. font-size: 16px;
  118. line-height: 1.5;
  119. }
  120. }
  121. /* 居中按钮容器 */
  122. .center-button {
  123. display: flex;
  124. justify-content: center; /* 水平居中 */
  125. align-items: flex-start; /* 垂直居中,但靠上 */
  126. width: 100%; /* 父容器宽度占满 */
  127. height: 100%; /* 父容器高度占满,确保垂直居中 */
  128. text-align: center; /* 按钮文本居中 */
  129. padding-top: 40px; /* 增加顶部的间距,确保按钮距离顶部有一定空间 */
  130. }
  131. .center-button ion-button {
  132. font-size: 18px; /* 增大字体 */
  133. padding: 14px 24px; /* 增大按钮内边距,增大按钮大小 */
  134. border-radius: 8px; /* 使按钮角度更加圆润 */
  135. }
  136. }