请问有没有办法在后台设置中修改代码的字体,我参照网上的改法如下 但是没有任何效果
.cnblogs_code pre {
font-family: Courier New !important;
font-size: 18px !important;
word-wrap: break-word;
white-space: pre-wrap;
}
.cnblogs_code span {
font-family: Courier New !important;
font-size: 18px !important;
line-height: 1.5 !important;
}
我的理想代码字体为JetBrainsMono
希望回答的朋友能够提供具体的该法
@font-face {
font-family: 'JetBrains Mono';
src: url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/webfonts/JetBrainsMono-Regular.woff2') format('woff2'),
url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/ttf/JetBrainsMono-Regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
font-display: swap;
}
.cnblogs_code pre {
font-family: JetBrains Mono, monospace !important;
font-size: 18px !important;
word-wrap: break-word;
white-space: pre-wrap;
}
.cnblogs_code span {
font-family: JetBrains Mono, monospace !important;
font-size: 18px !important;
line-height: 1.5 !important;
}
试试 是不是这种的
.cnblogs_code p {
font-family: Courier New !important;
font-size: 18px !important;
word-wrap: break-word;
white-space: pre-wrap;
}
.cnblogs_code p {
font-family: Courier New !important;
font-size: 18px !important;
line-height: 1.5 !important;
}
不对呀、我用你的代码也能出来阿。
办法正在来的路上,请稍候
– dudu 3年前你的自定义博客皮肤现在有问题
– dudu 3年前