From b4cb0a200e09aca5ba51e8e7278bec12686cd4b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E8=AF=9A?= Date: Mon, 12 Jan 2026 18:53:43 +0800 Subject: [PATCH] fix --- Web/src/styles/rich-content.css | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Web/src/styles/rich-content.css b/Web/src/styles/rich-content.css index c17b5e4..714fca3 100644 --- a/Web/src/styles/rich-content.css +++ b/Web/src/styles/rich-content.css @@ -55,23 +55,28 @@ /* 表格样式优化 - 确保表格独立滚动且列对齐 */ .rich-html-content table { - display: block; - min-width: 100%; + display: table; + width: 100%; border-collapse: collapse; margin: 8px 0; background: var(--van-background-2); border-radius: 4px; border: none; + table-layout: fixed; +} + +.rich-html-content table { overflow-x: auto; /* 仅表格内部横向滚动 */ -webkit-overflow-scrolling: touch; overflow-y: auto; max-height: 35vh; + display: block; } .rich-html-content thead, .rich-html-content tbody { display: table; - min-width: 100%; + width: 100%; table-layout: fixed; /* 核心:强制列宽分配逻辑一致 */ } @@ -98,10 +103,10 @@ font-weight: 600; } -/* 通用列宽规则:第一列占 40%,其他列自动平分剩余 60% */ +/* 通用列宽规则:第一列占 30%,其他列自动平分剩余 70% */ .rich-html-content th:first-child, .rich-html-content td:first-child { - max-width: 30%; + width: 30%; } /* 业务特定样式:收入、支出、高亮 */