博客自定义主题的提问

2021-02-18 15:14发布

请问有没有办法在后台设置中修改代码的字体,我参照网上的改法如下 但是没有任何效果
.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;
}

标签:
2条回答
劫难
2楼-- · 2021-02-18 15:30

试试 是不是这种的

.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;
}

查看更多
smile是对你的礼貌
3楼-- · 2021-02-18 15:34
@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;
}
查看更多
登录 后发表回答