最后效果
代码片段
/* 外边框 */
.markdown-rendered table {
border: 1px solid #ddd;
}
/* 斑马纹*/
.markdown-rendered tr:nth-child(even){
background-color: #f2f2f2;
}
/* 表头样式*/
.markdown-rendered thead tr {
background-color: #04AA6D;
border:none;
color: white;
border:none;
padding : 5px;
}
/* 表头单元格*/
.markdown-rendered th{
color: white;
border:none;
padding : 5px;
}
/* 表头悬浮不变色*/
.markdown-rendered thead tr:hover {
background-color: #04AA6D;
}
/* 单元格无边框*/
.markdown-rendered td{
border:none;
}
.markdown-rendered 这个可能Wlllemstad主题里面定义的(我没有验证过),推荐在obsidian控制台选择表格看下主题的表格写法。