Gmeek icon indicating copy to clipboard operation
Gmeek copied to clipboard

请问如何自定义CSS?

Open WangZhSi opened this issue 1 year ago • 1 comments

我看到config.json中有关于自定义css的字段“style”

在这基础上, 我自定义了一个css放在了新目录_assets下, 仅修改了字体(‘sans-serif’)做尝试, 并将css的绝对路径https://github.com/WangZhSi/WangZhSi.github.io/blob/main/_assets/style.css填写到了json文件中, 但是实际渲染并没有依据我的css渲染, 请问是我的使用方式哪里有问题吗?

另外关于同一仓库的文件调用问题, 假如我在css中自定义了字体:

@font-face {
	font-family: 'myLXGW';
	src: url();
}

此处url是否可以使用相对路径? 还是必须使用上面如同css绝对路径一样的格式?

谢谢!

WangZhSi avatar May 23 '24 10:05 WangZhSi

github的文件不能直接这样使用的,你可以使用CDN,地址如下

https://cdn.jsdelivr.net/gh/WangZhSi/WangZhSi.github.io@main/_assets/style.css

Meekdai avatar May 23 '24 12:05 Meekdai