更改memos的css
第一种方案:
/* === memos 强制宽屏 === */
/* 干掉所有 Tailwind max-w-* 限制 */
[class*="max-w-"] {
max-width: 95vw !important;
}
/* 取消 mx-auto 居中 */
[class*="mx-auto"] {
margin-left: 0 !important;
margin-right: 0 !important;
}
第二种方案:
/* ===== memos 宽屏布局 ===== */
[class*="max-w-"] {
max-width: 95vw !important;
}
[class*="mx-auto"] {
margin-left: 0 !important;
margin-right: 0 !important;
}
.memo-content {
overflow-x: auto;
}
.memo-content table {
min-width: 100%;
white-space: nowrap;
}
第三种方案:
#root [class*="max-w-"] {
max-width: 95vw !important;
}
#root [class*="mx-auto"] {
margin-left: 0 !important;
margin-right: 0 !important;
}
最终方案:
最终方案:
/* ===== memos 宽屏布局(稳定方案) ===== */
/* 放宽 Tailwind 写作容器 */
[class*="max-w-"] {
max-width: 96vw !important;
}
/* 取消居中,保留一点边距更耐看 */
[class*="mx-auto"] {
margin-left: 12px !important;
margin-right: 12px !important;
}
/* ===== Memo 内容区 ===== */
.memo-content {
overflow-x: auto;
padding-bottom: 6px;
}
/* ===== 表格整体优化 ===== */
.memo-content table {
min-width: 100%;
border-collapse: separate;
border-spacing: 0;
white-space: nowrap;
font-size: 0.9rem;
}
/* 表头 */
.memo-content th {
position: sticky;
top: 0;
background-color: var(--memo-bg, #f7f7f7);
font-weight: 600;
padding: 8px 10px;
border-bottom: 1px solid rgba(0,0,0,0.08);
z-index: 1;
}
/* 单元格 */
.memo-content td {
padding: 6px 10px;
vertical-align: middle;
}
/* 行 hover(非常重要,读表舒服) */
.memo-content tr:hover td {
background-color: rgba(0, 0, 0, 0.03);
}
/* ===== 暗色模式适配 ===== */
.dark .memo-content th {
background-color: #2a2a2a;
border-bottom: 1px solid rgba(255,255,255,0.15);
}
.dark .memo-content tr:hover td {
background-color: rgba(255,255,255,0.05);
}
评论