使用前效果
使用后效果
(function() {
var font_style = document.createElement("style");
font_style.type = 'text/css';
font_style.innerHTML = " *:not([class*='icon']):not(.fa):not(.fas):not(i) {font-family: 'PingFang SC','Heiti SC','myfont','Microsoft YaHei','Source Han Sans SC','Noto Sans CJK SC','HanHei SC', 'sans-serif' ,'icomoon','Icons' ,'brand-icons' ,'FontAwesome','Material Icons','Material Icons Extended','Glyphicons Halflings' !important;} *{text-shadow:1px 1px 10px #c3c3c3 !important; font-weight:bold !important;font-family: 'PingFang SC','Microsoft YaHei';}";
document.head.append(font_style);
})();
注意:
如果你设置了自定义字体,需要将上述代码中的 font-family:
定义为你的字体名称或删除,也就是直接使用下边的代码
(function() {
var font_style = document.createElement("style");
font_style.type = 'text/css';
font_style.innerHTML = " *:not([class*='icon']):not(.fa):not(.fas):not(i) *{text-shadow:1px 1px 10px #c3c3c3 !important; font-weight:bold !important;}";
document.head.append(font_style);
})();
参考文章:壹影博客 https://bk.yyge.net/?post=43