Files
jinshen-website/app/assets/css/typography.css
R2m1liA ec9a097ef5
All checks were successful
deploy to server / build-and-deploy (push) Successful in 2m56s
fix: 暂时弃用html-renderer将html渲染回滚到v-html
- 增添table样式
2025-11-14 13:29:00 +08:00

96 lines
1.8 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

.html-typography {
padding: 10px;
line-height: 1.6;
}
.html-typography h1 {
color: var(--el-color-primary);
font-size: 1.5em;
margin-bottom: 0.5em;
text-align: center;
}
.html-typography h2 {
color: var(--el-color-primary);
font-size: 1.5em;
margin-bottom: 0.5em;
}
.html-typography h3 {
color: var(--el-color-primary);
font-size: 1.2em;
margin-bottom: 0.5em;
}
.html-typography p {
text-indent: 2em;
text-align: justify;
margin: 0.5em 0;
margin-bottom: 1em;
}
.html-typography ol {
list-style-type: decimal;
padding-left: 2em;
margin-bottom: 1em;
}
.html-typography ul {
list-style-type: disc;
padding-left: 2em;
margin-bottom: 1em;
}
.html-typography hr {
border: none;
border-top: 1px solid var(--el-border-color);
margin: 20px 0;
}
/* 表格基础样式 */
.html-typography table {
width: 100%;
border-collapse: collapse;
border: 1px solid var(--el-border-color);
margin: 1em 0;
table-layout: auto;
font-size: 14px;
}
/* 单元格通用样式 */
.html-typography th,
.html-typography td {
border: 1px solid var(--el-border-color);
padding: 8px 12px;
text-align: left;
vertical-align: middle;
word-break: break-word;
}
/* 表头样式 */
.html-typography th {
background-color: var(--el-fill-color-light);
color: var(--el-text-color-primary);
font-weight: 600;
}
/* 行 hover 效果 */
.html-typography tbody tr:hover {
background-color: var(--el-fill-color-light-hover);
}
/* 交替行背景 */
.html-typography tbody tr:nth-child(odd) {
background-color: var(--el-fill-color-lighter);
}
/* 表格标题(如有 caption */
.html-typography table caption {
caption-side: top;
text-align: left;
padding: 8px 0;
font-size: 14px;
font-weight: 600;
color: var(--el-text-color-primary);
}