·
114 次浏览
标签: wordpress字体更改
用如下代码在wp后台自定义css,但是网站字体没有效果怎么解决?
@font-face {font-family: ‘AWan’;src: url (‘https://cdn.jsdelivr.net/gh/huiyio/Lib/fonts/AWan/Awan.eot’);src:url(‘https://cdn.jsdelivr.net/gh/huiyio/Lib/fonts/AWan/AWan.eot’) format(’embedded-opentype’),url(‘https://cdn.jsdelivr.net/gh/huiyio/Lib/fonts/AWan/AWan.woff2’) format(‘woff2’),url(‘https://cdn.jsdelivr.net/gh/huiyio/Lib/fonts/AWan/AWan.woff’) format(‘woff’),url(‘https://cdn.jsdelivr.net/gh/huiyio/Lib/fonts/AWan/AWan.ttf’) format(‘truetype’),url(‘https://cdn.jsdelivr.net/gh/huiyio/Lib/fonts/AWan/AWan.svg’) format(‘svg’);font-weight: normal;font-style: normal;font-display: swap;}*:not ([class*=”icon”]):not (i) {font-family: “AWan” !important;}
仓库容量达上限了,没法用jsdelivr获取,你用开发者工具看一下加载字体的链接正不正常就知道了
F12看下 CDN 链接成功没 JSdelivr 经常被墙
CDN
JSdelivr
有奖参与论坛社区问答