很想要给文档增加多彩的 css 显示,在群里找到大佬的代码但是增加了不生效,请问是哪里出错了啊.color 也都有定义
/* 给文档树第一层级设置同样的样式 */ .fn__flex-1.fn__flex-column.file-tree.sy__file ul.b3-list.b3-list--background { /* 控制圆角大小 */ border-radius: 1px; /* 控制外边距,分别是 上 右 下 左侧 */ margin: 6px 4px 6px 4px; /* 控制边框为1像素的实线 */ border: 1px solid var(--b3-border-color); } /* 给文档树第一层级设置不同的背景颜色,8个一循环 */ .fn__flex-1.fn__flex-column.file-tree.sy__file ul.b3-list.b3-list--background:nth-of-type(8n) { background-color: var(--b3-font-background1) !important; } .fn__flex-1.fn__flex-column.file-tree.sy__file ul.b3-list.b3-list--background:nth-of-type(8n+1) { background-color: var(--b3-font-background2) !important; } .fn__flex-1.fn__flex-column.file-tree.sy__file ul.b3-list.b3-list--background:nth-of-type(8n+2) { background-color: var(--b3-font-background3) !important; } .fn__flex-1.fn__flex-column.file-tree.sy__file ul.b3-list.b3-list--background:nth-of-type(8n+3) { background-color: var(--b3-font-background4) !important; } .fn__flex-1.fn__flex-column.file-tree.sy__file ul.b3-list.b3-list--background:nth-of-type(8n+4) { background-color: var(--b3-font-background5) !important; } .fn__flex-1.fn__flex-column.file-tree.sy__file ul.b3-list.b3-list--background:nth-of-type(8n+5) { background-color: var(--b3-font-background6) !important; } .fn__flex-1.fn__flex-column.file-tree.sy__file ul.b3-list.b3-list--background:nth-of-type(8n+6) { background-color: var(--b3-font-background7) !important; } .fn__flex-1.fn__flex-column.file-tree.sy__file ul.b3-list.b3-list--background:nth-of-type(8n+7) { background-color: var(--b3-font-background8) !important; } /*作者:Zhangwuji 链接:https://ld246.com/article/1655395256322 来源:链滴 协议:CC BY-SA 4.0 https://creativecommons.org/licenses/by-sa/4.0/ */
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于