From a9435b88afc39cfa915524fce26d371d958fe0f8 Mon Sep 17 00:00:00 2001 From: yiqiu Date: Fri, 20 Mar 2026 22:37:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=B9=E7=94=A8CSS=20Grid=E4=BF=9D?= =?UTF-8?q?=E8=AF=81=E4=B8=89=E8=A1=8C=E5=88=97=E5=AE=BD=E5=AE=8C=E5=85=A8?= =?UTF-8?q?=E4=B8=80=E8=87=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - row-1/row-2/row-3统一用grid-template-columns:3fr 2fr - Grid列轨道共享确保像素级对齐 - 响应式改为grid-template-columns:1fr --- clientarea/home/hgcloud_home/css/home.css | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/clientarea/home/hgcloud_home/css/home.css b/clientarea/home/hgcloud_home/css/home.css index dee0d69..3d8f917 100644 --- a/clientarea/home/hgcloud_home/css/home.css +++ b/clientarea/home/hgcloud_home/css/home.css @@ -45,11 +45,9 @@ /* ====== ROW 1 — 用户信息 + 统计卡片(并排) ====== */ .row-1 { - display: flex !important; - flex-direction: row !important; - flex-wrap: nowrap !important; + display: grid !important; + grid-template-columns: 3fr 2fr !important; gap: 16px !important; - align-items: stretch !important; } /* 用户卡片:占 60% */ .card-user { @@ -136,11 +134,9 @@ /* ====== ROW 2 — 余额 + 侧边 ====== */ .row-2 { - display: flex !important; - flex-direction: row !important; - flex-wrap: nowrap !important; + display: grid !important; + grid-template-columns: 3fr 2fr !important; gap: 16px !important; - align-items: stretch !important; } /* 余额卡 60% */ @@ -237,11 +233,9 @@ /* ====== ROW 3 — 产品列表 + 侧栏 ====== */ .row-3 { - display: flex !important; - flex-direction: row !important; - flex-wrap: nowrap !important; + display: grid !important; + grid-template-columns: 3fr 2fr !important; gap: 16px !important; - align-items: stretch !important; } /* 产品卡 65% */ @@ -318,9 +312,7 @@ /* Responsive */ @media (max-width: 1100px) { - .row-1, .row-2, .row-3 { flex-wrap: wrap !important; } - .card-user, .card-balance, .card-products { flex: 1 1 100% !important; } - .stats-group, .card-side, .card-sidebar { flex: 1 1 100% !important; } + .row-1, .row-2, .row-3 { grid-template-columns: 1fr !important; } } @media (prefers-reduced-motion: reduce) { * { transition-duration: 0.01ms !important; }