Calculation.wxss 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. /* 页面主体样式 */
  2. .page-body {
  3. padding-left: 10rpx; /* 页面内容的左内边距 */
  4. background-color: #f8f8f8; /* 设置页面背景颜色为浅灰色 */
  5. }
  6. /* 白色盒子样式,常用于容器组件 */
  7. .white-box {
  8. width: 90%; /* 宽度占页面 90% */
  9. margin: 10rpx auto; /* 设置外边距,居中显示 */
  10. padding: 20rpx; /* 内边距,增加内容与边框的间距 */
  11. background-color: #fff; /* 设置背景颜色为白色 */
  12. border-radius: 10rpx; /* 圆角边框,柔化视觉效果 */
  13. box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.1); /* 添加阴影,提升层次感 */
  14. }
  15. /* 输入行容器样式 */
  16. .input-row {
  17. display: flex; /* 使用 Flexbox 布局 */
  18. align-items: center; /* 垂直居中对齐 */
  19. justify-content: space-between; /* 标题和输入框分布在一行 */
  20. margin-bottom: 1rpx; /* 行与行之间的间距 */
  21. }
  22. /* 页面分区标题样式 */
  23. .page-section-title {
  24. flex-shrink: 0; /* 防止标题缩小 */
  25. font-size: 30rpx; /* 标题字体大小 */
  26. font-weight: bold; /* 标题加粗 */
  27. color: #333; /* 字体颜色 */
  28. margin-right: 10rpx; /* 标题与输入框的间距 */
  29. }
  30. /* 输入框样式 */
  31. .input-field {
  32. flex-grow: 1; /* 输入框占据剩余空间 */
  33. padding: 10rpx; /* 输入框内边距 */
  34. font-size: 28rpx; /* 输入框字体大小 */
  35. color: #333; /* 输入框文本颜色 */
  36. border: none; /* 移除默认边框 */
  37. border-bottom: 1px solid #ddd; /* 添加下划线边框 */
  38. outline: none; /* 移除默认选中样式 */
  39. transition: border-color 0.3s; /* 增加选中时边框的动画过渡 */
  40. }
  41. /* 输入框选中状态 */
  42. .input-field:focus {
  43. border-bottom: 1px solid #3EC01E; /* 输入框选中时底部边框变为绿色 */
  44. }
  45. /* 占位符样式 */
  46. .input-field::placeholder {
  47. color: #aaa; /* 调整占位符颜色为浅灰 */
  48. }
  49. /* 单选框文本样式 */
  50. .radio {
  51. font-size: 28rpx; /* 文本字体大小 */
  52. color: #666; /* 文本颜色为中灰色 */
  53. margin: 5rpx 0; /* 上下外边距 */
  54. }
  55. /* 加粗文本样式 */
  56. .bold-text {
  57. font-weight: bold; /* 文本加粗 */
  58. }
  59. /* 绿色按钮容器样式 */
  60. .green-btn {
  61. margin-top: 20rpx; /* 顶部外边距 */
  62. text-align: center; /* 按钮内容居中 */
  63. }
  64. /* 按钮样式 */
  65. .btn {
  66. width: 60%; /* 按钮宽度占页面 80% */
  67. padding: 15rpx 0; /* 上下内边距 */
  68. background-color: #3EC01E; /* 按钮背景颜色为绿色 */
  69. color: #fff; /* 按钮文字颜色为白色 */
  70. font-size: 28rpx; /* 按钮文字字体大小 */
  71. border-radius: 10rpx; /* 圆角边框,柔化视觉效果 */
  72. transition: all 0.2s; /* 增加交互的过渡动画 */
  73. }
  74. /* 按钮点击效果 */
  75. .btn:active {
  76. background-color: #32A317; /* 按下时按钮颜色稍深 */
  77. transform: scale(0.98); /* 按下时轻微缩放效果 */
  78. }
  79. /* 下拉选择器的占位文本样式 */
  80. .picker-placeholder {
  81. flex-grow: 1; /* 占据剩余空间 */
  82. color: #888; /* 占位文本颜色为浅灰色 */
  83. margin-right: 10px; /* 右侧外边距 */
  84. }
  85. /* 下拉选择器样式 */
  86. .picker {
  87. flex-shrink: 0; /* 防止组件缩小 */
  88. width: 100px; /* 设置选择器的宽度 */
  89. }
  90. /* 响应式设计:适配小屏幕 */
  91. @media screen and (max-width: 320px) {
  92. .page-section-title {
  93. font-size: 26rpx; /* 小屏设备标题字体稍小 */
  94. }
  95. .input-field {
  96. font-size: 24rpx; /* 输入框字体适配小屏 */
  97. }
  98. .btn {
  99. font-size: 24rpx; /* 按钮文字大小调整 */
  100. }
  101. }
  102. /* 弹窗背景 */
  103. .modal-overlay {
  104. position: fixed;
  105. top: 0;
  106. left: 0;
  107. right: 0;
  108. bottom: 0;
  109. background: rgba(0, 0, 0, 0.9); /* 背景半透明 */
  110. display: flex;
  111. justify-content: center;
  112. align-items: center;
  113. z-index: 1000;
  114. }
  115. /* 弹窗内容 */
  116. .modal {
  117. background-color: white;
  118. padding: 20px;
  119. border-radius: 8px;
  120. width: 80%;
  121. max-width: 300px;
  122. text-align: center;
  123. }
  124. /* 弹窗头部 */
  125. .modal-header {
  126. display: flex;
  127. justify-content: space-between;
  128. align-items: center;
  129. font-weight: bold;
  130. margin-bottom: 20px;
  131. }
  132. /* 关闭按钮 */
  133. .close-btn {
  134. position: absolute; /* 绝对定位 */
  135. top: 300px; /* 距离顶部 10px */
  136. left: 315px; /* 距离左侧 10px */
  137. background: transparent;
  138. border: none; /* 隐藏边框 */
  139. outline: none; /* 确保没有外部轮廓 */
  140. font-size: 15px;
  141. color: red;
  142. cursor: pointer;
  143. }
  144. /* 弹窗正文 */
  145. .modal-body {
  146. font-size: 20px;
  147. color: #000;
  148. }