| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- /* Markdown 渲染样式 */
- .markdown-content {
- line-height: 1.6;
- color: #374151;
- }
- /* 代码块样式优化 */
- .markdown-content pre {
- margin: 1rem 0;
- border-radius: 0.5rem;
- overflow: hidden;
- }
- .markdown-content pre code {
- background: transparent !important;
- padding: 0 !important;
- border-radius: 0 !important;
- font-size: 0.875rem;
- }
- /* 行内代码样式 */
- .markdown-content code:not(pre code) {
- background-color: #f3f4f6;
- color: #dc2626;
- padding: 0.125rem 0.375rem;
- border-radius: 0.25rem;
- font-size: 0.875rem;
- font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
- }
- /* 表格样式 */
- .markdown-content table {
- border-collapse: collapse;
- margin: 1rem 0;
- width: 100%;
- box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
- }
- .markdown-content table th {
- background-color: #f9fafb;
- font-weight: 600;
- text-align: left;
- padding: 0.75rem 1rem;
- border: 1px solid #d1d5db;
- }
- .markdown-content table td {
- padding: 0.75rem 1rem;
- border: 1px solid #d1d5db;
- }
- .markdown-content table tr:nth-child(even) {
- background-color: #f9fafb;
- }
- .markdown-content table tr:hover {
- background-color: #f3f4f6;
- }
- /* 标题样式 */
- .markdown-content h1,
- .markdown-content h2,
- .markdown-content h3,
- .markdown-content h4,
- .markdown-content h5,
- .markdown-content h6 {
- margin-top: 1.5rem;
- margin-bottom: 0.75rem;
- font-weight: 600;
- line-height: 1.25;
- }
- .markdown-content h1 {
- font-size: 1.875rem;
- border-bottom: 2px solid #e5e7eb;
- padding-bottom: 0.5rem;
- }
- .markdown-content h2 {
- font-size: 1.5rem;
- }
- .markdown-content h3 {
- font-size: 1.25rem;
- }
- /* 段落样式 */
- .markdown-content p {
- margin-bottom: 1rem;
- line-height: 1.7;
- }
- /* 列表样式 */
- .markdown-content ul,
- .markdown-content ol {
- margin-bottom: 1rem;
- padding-left: 1.5rem;
- }
- .markdown-content li {
- margin-bottom: 0.25rem;
- line-height: 1.6;
- }
- .markdown-content ul li {
- list-style-type: disc;
- }
- .markdown-content ol li {
- list-style-type: decimal;
- }
- /* 嵌套列表 */
- .markdown-content ul ul,
- .markdown-content ol ol,
- .markdown-content ul ol,
- .markdown-content ol ul {
- margin-top: 0.25rem;
- margin-bottom: 0.25rem;
- }
- /* 引用样式 */
- .markdown-content blockquote {
- border-left: 4px solid #3b82f6;
- background-color: #eff6ff;
- padding: 1rem;
- margin: 1rem 0;
- font-style: italic;
- border-radius: 0 0.375rem 0.375rem 0;
- }
- .markdown-content blockquote p {
- margin-bottom: 0;
- }
- /* 链接样式 */
- .markdown-content a {
- color: #2563eb;
- text-decoration: underline;
- transition: color 0.2s ease;
- }
- .markdown-content a:hover {
- color: #1d4ed8;
- }
- /* 分割线样式 */
- .markdown-content hr {
- border: none;
- border-top: 1px solid #d1d5db;
- margin: 2rem 0;
- }
- /* 强调样式 */
- .markdown-content strong {
- font-weight: 600;
- color: #111827;
- }
- .markdown-content em {
- font-style: italic;
- }
- /* 图片样式 */
- .markdown-content img {
- max-width: 100%;
- height: auto;
- border-radius: 0.375rem;
- margin: 1rem 0;
- box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
- }
- /* 响应式表格 */
- @media (max-width: 768px) {
- .markdown-content table {
- font-size: 0.875rem;
- }
-
- .markdown-content table th,
- .markdown-content table td {
- padding: 0.5rem;
- }
- }
- /* 代码复制按钮样式 */
- .markdown-content .code-copy-btn {
- position: absolute;
- top: 0.5rem;
- right: 0.5rem;
- background-color: rgba(55, 65, 81, 0.8);
- color: white;
- border: none;
- padding: 0.25rem 0.5rem;
- border-radius: 0.25rem;
- font-size: 0.75rem;
- cursor: pointer;
- opacity: 0;
- transition: opacity 0.2s ease;
- }
- .markdown-content .code-block-container:hover .code-copy-btn {
- opacity: 1;
- }
- .markdown-content .code-copy-btn:hover {
- background-color: rgba(75, 85, 99, 0.9);
- }
|