fix: render of markdown preview

This commit is contained in:
h z
2024-12-06 17:22:42 +00:00
parent ccdded32a8
commit df7ba4c490
9 changed files with 164 additions and 79 deletions

View File

@@ -0,0 +1,49 @@
.markdown-preview {
padding: 15px;
border: 1px solid #ddd;
border-radius: 8px;
background-color: #ffffff;
white-space: normal;
word-wrap: break-word;
overflow-x: auto;
}
.katex-display {
margin: 1em 0;
text-align: center;
}
.katex {
font-size: 1.2rem;
}
code {
font-family: 'Courier New', Courier, monospace;
background-color: #f4f4f4;
padding: 2px 4px;
border-radius: 4px;
}
pre {
background-color: #2d2d2d;
color: #f8f8f2;
padding: 10px;
border-radius: 6px;
overflow-x: auto;
}
.markdown-preview ul,
.markdown-preview ol {
padding-left: 1.5rem; /* 设置左侧缩进 */
margin-bottom: 1rem; /* 每个列表的底部间距 */
}
.markdown-preview ul {
list-style-type: disc; /* 确保无序列表使用圆点 */
}
.markdown-preview ol {
list-style-type: decimal; /* 确保有序列表使用数字 */
}
.markdown-preview li {
margin-bottom: 0.5rem; /* 列表项之间的间距 */
}