|
@@ -3,6 +3,8 @@ $primary-color: #3880ff; // 主色调
|
|
$secondary-color: #f4f4f4; // 辅助色调
|
|
$secondary-color: #f4f4f4; // 辅助色调
|
|
$accent-color: #ff4081; // 强调色
|
|
$accent-color: #ff4081; // 强调色
|
|
$font-family: 'Helvetica Neue', Arial, sans-serif;
|
|
$font-family: 'Helvetica Neue', Arial, sans-serif;
|
|
|
|
+$border-radius: 8px; // 圆角半径
|
|
|
|
+$box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); // 阴影样式
|
|
|
|
|
|
/* 主样式 */
|
|
/* 主样式 */
|
|
ion-header {
|
|
ion-header {
|
|
@@ -37,39 +39,43 @@ ion-content {
|
|
padding: 10px;
|
|
padding: 10px;
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
color: $primary-color;
|
|
color: $primary-color;
|
|
|
|
+ transition: background-color 0.3s;
|
|
|
|
|
|
&.activated {
|
|
&.activated {
|
|
background-color: $primary-color;
|
|
background-color: $primary-color;
|
|
color: white;
|
|
color: white;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ &:hover {
|
|
|
|
+ background-color: lighten($primary-color, 30%);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
/* 输入框和显示区域 */
|
|
/* 输入框和显示区域 */
|
|
.info-section {
|
|
.info-section {
|
|
background-color: white;
|
|
background-color: white;
|
|
- border-radius: 8px;
|
|
|
|
|
|
+ border-radius: $border-radius;
|
|
padding: 16px;
|
|
padding: 16px;
|
|
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
|
|
|
|
+ box-shadow: $box-shadow;
|
|
margin-bottom: 16px;
|
|
margin-bottom: 16px;
|
|
|
|
|
|
.input-row {
|
|
.input-row {
|
|
display: flex;
|
|
display: flex;
|
|
- justify-content: center; /* 水平居中 */
|
|
|
|
|
|
+ justify-content: center;
|
|
margin-bottom: 16px;
|
|
margin-bottom: 16px;
|
|
|
|
|
|
.input-group {
|
|
.input-group {
|
|
- width: 60%; /* 控制输入框的宽度为60% */
|
|
|
|
- max-width: 300px; /* 限制最大宽度 */
|
|
|
|
|
|
+ width: 60%;
|
|
|
|
+ max-width: 300px;
|
|
display: flex;
|
|
display: flex;
|
|
- flex-direction: column; /* 垂直排列标签和输入框 */
|
|
|
|
- align-items: center; /* 内容居中对齐 */
|
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ align-items: center;
|
|
|
|
|
|
label {
|
|
label {
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
margin-bottom: 4px;
|
|
margin-bottom: 4px;
|
|
- display: block;
|
|
|
|
- text-align: center; /* 标签居中 */
|
|
|
|
|
|
+ text-align: center;
|
|
}
|
|
}
|
|
|
|
|
|
.input-box {
|
|
.input-box {
|
|
@@ -77,6 +83,11 @@ ion-content {
|
|
padding: 8px;
|
|
padding: 8px;
|
|
border: 1px solid #ccc;
|
|
border: 1px solid #ccc;
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
|
|
+ transition: border-color 0.3s;
|
|
|
|
+
|
|
|
|
+ &:focus {
|
|
|
|
+ border-color: $primary-color; // 聚焦时边框颜色
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
.unit {
|
|
.unit {
|
|
@@ -90,9 +101,9 @@ ion-content {
|
|
/* BMI输出框 */
|
|
/* BMI输出框 */
|
|
.textarea-section {
|
|
.textarea-section {
|
|
background-color: white;
|
|
background-color: white;
|
|
- border-radius: 8px;
|
|
|
|
|
|
+ border-radius: $border-radius;
|
|
padding: 16px;
|
|
padding: 16px;
|
|
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
|
|
|
|
+ box-shadow: $box-shadow;
|
|
margin-bottom: 16px;
|
|
margin-bottom: 16px;
|
|
|
|
|
|
.textarea-input {
|
|
.textarea-input {
|
|
@@ -102,6 +113,11 @@ ion-content {
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
padding: 8px;
|
|
padding: 8px;
|
|
resize: none;
|
|
resize: none;
|
|
|
|
+ transition: border-color 0.3s;
|
|
|
|
+
|
|
|
|
+ &:focus {
|
|
|
|
+ border-color: $primary-color; // 聚焦时边框颜色
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -128,9 +144,9 @@ ion-content {
|
|
/* 内容框 */
|
|
/* 内容框 */
|
|
.bigbox1 {
|
|
.bigbox1 {
|
|
background-color: white;
|
|
background-color: white;
|
|
- border-radius: 8px;
|
|
|
|
|
|
+ border-radius: $border-radius;
|
|
padding: 16px;
|
|
padding: 16px;
|
|
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
|
|
|
|
+ box-shadow: $box-shadow;
|
|
margin-top: 16px;
|
|
margin-top: 16px;
|
|
|
|
|
|
.content-style {
|
|
.content-style {
|
|
@@ -142,17 +158,39 @@ ion-content {
|
|
/* 居中按钮容器 */
|
|
/* 居中按钮容器 */
|
|
.center-button {
|
|
.center-button {
|
|
display: flex;
|
|
display: flex;
|
|
- justify-content: center; /* 水平居中 */
|
|
|
|
- align-items: flex-start; /* 垂直居中,但靠上 */
|
|
|
|
- width: 100%; /* 父容器宽度占满 */
|
|
|
|
- height: 100%; /* 父容器高度占满,确保垂直居中 */
|
|
|
|
- text-align: center; /* 按钮文本居中 */
|
|
|
|
- padding-top: 40px; /* 增加顶部的间距,确保按钮距离顶部有一定空间 */
|
|
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: flex-start;
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100%;
|
|
|
|
+ text-align: center;
|
|
|
|
+ padding-top: 40px;
|
|
|
|
+
|
|
|
|
+ ion-button {
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ padding: 14px 24px;
|
|
|
|
+ border-radius: $border-radius;
|
|
|
|
+ transition: background-color 0.3s;
|
|
|
|
+
|
|
|
|
+ &:hover {
|
|
|
|
+ background-color: lighten($primary-color, 20%);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+}
|
|
|
|
|
|
- .center-button ion-button {
|
|
|
|
- font-size: 18px; /* 增大字体 */
|
|
|
|
- padding: 14px 24px; /* 增大按钮内边距,增大按钮大小 */
|
|
|
|
- border-radius: 8px; /* 使按钮角度更加圆润 */
|
|
|
|
|
|
+/* 媒体查询,增强响应性 */
|
|
|
|
+@media (max-width: 768px) {
|
|
|
|
+ .info-section .input-group {
|
|
|
|
+ width: 80%; /* 在小屏幕上增加输入框宽度 */
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
+
|
|
|
|
+ .custom-segment {
|
|
|
|
+ flex-direction: column; /* 垂直排列 */
|
|
|
|
+ align-items: center;
|
|
|
|
+
|
|
|
|
+ .nav-button {
|
|
|
|
+ margin-bottom: 8px; /* 按钮之间的间距 */
|
|
|
|
+ width: 100%; /* 按钮宽度100% */
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|