G-White 2.4 wordpress 修改 默认字体

很喜欢G-White这款主题,布局合理,结构清爽,唯一的不满意就是默认字体稍小。起初几篇博客都通过手动html – font size 解决,总是有些麻烦,下决心请教谷歌,过滤了无效信息,找到些有用的文章:

1. 很直接的关于G-White的字体修改,非常有效,完全解决问题。
复制代码,0.77em 改大一點
style.css
body {
font: 0.77em/170% “Lucida Grande”, Verdana, Helvetica, sans-serif;
color: #555555;}

2. 这个不是直接关于G-White主题的修改,但都是通过wordpress后台修改css文件,而且修改了字体,看了效果也很喜欢。
在后台【外观】—【编辑】中找到主题的css文件,进入后最前面会有body的定义,修改其中的font-family和font-size字段即可。定义的字体是微软雅黑,字号是13px。
001 body {
002 margin: 0;
003 padding: 0;
004 color: black;
005 font-family: 微软雅黑,Verdana,arial,’lucida sans unicode’, georgia, sans-serif;
006 font-size: 13px;
007 line-height: 1.6em;
008 border-top:2px solid #0a8cbe;
009 }

找到wordpress后台,找到外观-编辑里的html代码:
/* Theme Name: G-White 2.4
Theme URI: http://www.alanoy.com/wordpress-theme-g-white-2-4/
Description: 2 Columns WP Theme
Author: Alan Ouyang
Author URI: http://www.alanoy.com/
*/

/*************************** General styles ****************************/

* {
font-family: “Lucida Grande”, “Trebuchet MS”, Verdana, Helvetica, sans-serif;
margin: 0;
padding: 0;
}
html {
margin: 0;
padding: 0;
}
body {
font: 0.77em/170% “Lucida Grande”, Verdana, Helvetica, sans-serif;
color: #555555;

尝试修改好两处红色部分,其中0.77em来回从1.50-0.77尝试了几次,最终觉得1.00最好看:
1. font-family: 微软雅黑, “Lucida Grande”, “Trebuchet MS”, Verdana, Helvetica, sans-serif;
2. font: 1.00em/170% 微软雅黑, “Lucida Grande”, Verdana, Helvetica, sans-serif;
color: #555555;

挺满足,算是又进一步。

发布者

ningqun

心中无事一床宽

发表评论

邮箱地址不会被公开。 必填项已用*标注