管灌系统农户端微信小程序(嘉峪关应用)
pages/home/home.wxss
@@ -11,7 +11,7 @@
.head-wrapper {
    background-color: #1890FF;
    height: 25vh;
  height: 20vh;
    width: 100%;
    padding-left: 40rpx;
    display: grid;
@@ -87,48 +87,113 @@
}
.center-wrapper {
    margin-top: -40rpx;
    margin-right: 20rpx;
    margin-left: 20rpx;
    margin-bottom: 10rpx;
    height: 18vh;
  margin: -40rpx 20rpx 10rpx 20rpx;
  padding: 40rpx 30rpx;
    background-color: #fff;
    border-radius: 5px;
    display: flex;
    padding-top: 20rpx;
    padding-bottom: 20rpx;
    justify-content: space-around;
  border-radius: 16rpx;
  box-shadow: 0 8rpx 32rpx rgba(0, 0, 0, 0.08);
    z-index: 1;
    /* 使 center-wrapper 在头部之上 */
  position: relative;
}
.center-view {
    flex: 1;
    /* 每个元素平分宽度 */
.center-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10rpx;
  align-items: stretch;
}
.grid-item {
    display: flex;
    flex-direction: column;
    /* 在纵向上排列子元素 */
    align-items: center;
    /* 在纵向上居中显示子元素 */
  justify-content: flex-start;
  padding: 10rpx 10rpx;
  border-radius: 12rpx;
  transition: all 0.3s ease;
  cursor: pointer;
  height: 140rpx;
  box-sizing: border-box;
}
.grid-item:active {
  transform: scale(0.95);
  background-color: #f8f9fa;
}
.grid-item-wide {
  grid-column: span 2;
  background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
  border: 1rpx solid #e1f0ff;
}
.item-icon {
  display: flex;
  align-items: center;
    justify-content: center;
    /* 在横向和纵向上都居中显示子元素 */
  width: 80rpx;
  height: 80rpx;
  margin-bottom: 16rpx;
  border-radius: 50%;
  background: linear-gradient(135deg, #1890FF 0%, #40a9ff 100%);
  box-shadow: 0 4rpx 16rpx rgba(24, 144, 255, 0.3);
  flex-shrink: 0;
}
.center-view image,
.center-view t-avatar {
    width: 90rpx;
    /* 根据需要调整图标大小 */
    height: 90rpx;
    /* 根据需要调整图标大小 */
    margin-bottom: 10rpx;
    /* 图标和文本之间的间距 */
.item-icon image {
  width: 40rpx;
  height: 40rpx;
  filter: brightness(0) invert(1);
}
.center-view text {
    margin-top: 15rpx;
    font-size: 30rpx;
    color: #1890FF;
.item-text {
  font-size: 23rpx;
  color: #333;
  font-weight: 500;
  text-align: center;
  line-height: 1.4;
  max-width: 100%;
  word-break: break-word;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}
/* 响应式设计 */
@media (max-width: 750rpx) {
  .center-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16rpx;
  }
  .grid-item-wide {
    grid-column: span 2;
  }
  .grid-item {
    height: 140rpx;
    padding: 16rpx 8rpx;
  }
  .item-icon {
    width: 70rpx;
    height: 70rpx;
    margin-bottom: 12rpx;
  }
  .item-icon image {
    width: 36rpx;
    height: 36rpx;
  }
  .item-text {
    font-size: 26rpx;
  }
}
.bottom-wrapper {
    margin-right: 20rpx;
@@ -234,7 +299,8 @@
    font-size: 42rpx !important;
    margin-left: 16rpx;
    margin-right: 15rpx;
    white-space: nowrap; /* 防止文本换行 */
  white-space: nowrap;
  /* 防止文本换行 */
    font-weight: 500;
    color: #333;
    flex-shrink: 0;
@@ -287,7 +353,8 @@
    font-size: 30rpx !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap; /* 确保文字不换行 */
  white-space: nowrap;
  /* 确保文字不换行 */
    box-shadow: 0 4rpx 8rpx rgba(24, 144, 255, 0.2);
    transition: all 0.3s;
}
@@ -408,10 +475,12 @@
        opacity: 0.2;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
    100% {
        opacity: 0.2;
        transform: scale(0.8);
@@ -674,7 +743,8 @@
}
.project-scroll-view {
    max-height: 55vh; /* 稍微减小高度,确保在小屏幕上也能看到底部按钮 */
  max-height: 55vh;
  /* 稍微减小高度,确保在小屏幕上也能看到底部按钮 */
    height: auto;
}
@@ -741,6 +811,7 @@
    align-items: center;
    /* 垂直居中对齐 */
}
.content-container {
    white-space: pre-line;
    word-wrap: break-word;
@@ -805,4 +876,3 @@
  border-radius: 15rpx;
  padding: 6rpx 14rpx;
}