wordpress我主题style.css没有font-family改怎么改字体?

这是style.css内容
2025-03-22 02:21:37
推荐回答(3个)
回答1:

现在你贴出来的css是空的,全是注释。设定全局字体可以在文本最后另起一行或者清空重写:

*{font-family: "微软雅黑";}
html, body{font-family: "微软雅黑";}

回答2:

关键代码:
#entry_box h2 {width:650px;height:40px;line-height:40px;background:#;color:#333;overflow:hidden;}
这个应该是标题的样式
#entry p {width:650px;line-height:1.5;margin:10px auto;overflow:hidden;font-size:1em;}
这个应该是正文段落的样式

如果想添加字体设置等,可以再上面添加。例如让标题变成宋体,让正文变成 微软雅黑,可以这样
#entry_box h2 {width:650px;height:40px;line-height:40px;background:#;color:#333;overflow:hidden;font-family: "宋体";}
#entry p {width:650px;line-height:1.5;margin:10px auto;overflow:hidden;font-size:1em;font-family: "宋体";}
试试看,由于没有结合具体的布局,所以可能不准,通过字面观察,应该是这样的。

回答3:

亲,上边只是style.css的介绍,你要修改font-family的话找到对应的id选择器或者类选择器.比如#id{font-family:Microsoft yahei;}表示为微软雅黑字体.或者.class{font-family: SimSun;}表示设置为宋体....