为wordpress后台添加微软雅黑字体

  • 时间:2020-05-22 15:47:15
  • 分类:网络文摘
  • 阅读:97 次

自wordpress 3.3中文版以后,官方一直没有为后台添加微软雅黑字体。虽然在高版本IE中默认显示为微软雅黑,但在其它第三方浏览器,比如火狐、Chrome显示的是"Open Sans",sans-serif字体,显示效果欠佳。可以通过下面的wordpress技巧为后台添加微软雅黑字体,以期获得更佳显示效果。

为wordpress后台添加微软雅黑字体

方法:添加如下代码到wordpress主题的functions.php文件中即可:

  1. function admin_lettering(){
  2.     echo'<style type="text/css">
  3.      body{ font-family: Microsoft YaHei;}
  4.     </style>';
  5.     }
  6. add_action('admin_head', 'admin_lettering');

如果你喜欢其它字体,也可以使用此方法添加。

微软雅黑体简介:微软雅黑体由中国北大方正电子有限公司设计,属于无衬线黑体,字形略呈扁方而饱满,笔画简洁而舒展,易于阅读,全面支持 ClearType技术的中文界面显示。微软雅黑字体随简体中文版windows Vista一起发布,是Windows Vista以上系统版本的默认字体。另外,Microsoft Office 2007简体中文版也附带这个字体。

推荐阅读:
Compute the Indices of the Target Element in Array/List using Py  5 Cognitive Biases You Can Use to Boost E-Commerce Conversions  Important SEO Tips for E-commerce That You Cannot Disregard  5 Effective Ways to Improve Blog Conversion Rate  7 Reasons Blogging is Essential for Law Firms  Should Your Blog Extend Into Multimedia Forms of Content?  How Small Companies Can Use Big Data  Hands Up and Step Slowly Away from the Keyboard: Why Good Execut  How to Improve Bad Blog Posts  5 Things That Bloggers Use in Their Craft 
评论列表
添加评论