日志分析表格,使隔行颜色样式不一样

This commit is contained in:
zjl
2025-01-23 23:04:58 +08:00
parent 07efcbde4f
commit d70ed4314a

View File

@@ -442,6 +442,8 @@ namespace LogParse
html.AppendLine(" table { border-collapse: collapse; width: 100%; margin-bottom: 20px; }");
html.AppendLine(" th, td { border: 1px solid black; padding: 8px; text-align: left; }");
html.AppendLine(" th { background-color: #f2f2f2; }");
html.AppendLine(" tr:nth-child(odd) { background-color: #eaeaea; /* 奇数行颜色 */ }");
html.AppendLine(" tr:nth-child(even) { background-color: #f9f9f9; /* 偶数行颜色 */}");
html.AppendLine(" </style>");
html.AppendLine("</head>");
html.AppendLine("<body>");