Home  >  Article  >  Backend Development  >  css - 请问为什么我的网页无法使用 php.net 的 "Fira Mono" 字体?

css - 请问为什么我的网页无法使用 php.net 的 "Fira Mono" 字体?

WBOY
WBOYOriginal
2016-06-06 20:39:17768browse

在看php.net文档的时候,发现页面的英文字体("Fira Mono")挺好看的,如图:
css - 请问为什么我的网页无法使用 php.net 的

可是放到我自己的网页里就变挫了。请问是什么原因呢?(同一台电脑 、同一个浏览器)
css - 请问为什么我的网页无法使用 php.net 的

回复内容:

在看php.net文档的时候,发现页面的英文字体("Fira Mono")挺好看的,如图:
css - 请问为什么我的网页无法使用 php.net 的

可是放到我自己的网页里就变挫了。请问是什么原因呢?(同一台电脑 、同一个浏览器)
css - 请问为什么我的网页无法使用 php.net 的

你的系统里没有这种字体吧。而且你的网页没有引入这种字体的字体文件。你要把这种字体的字体文件下载到你的网站的公共文件夹里,然后通过css引用才行。
@font-face {
font-family: 'Fira Sans'; /这里是说明调用来的字体名字/
src: url(这里写你的字体文件位置); /这里是字体文件路径/
}

关键词 “WebFont”

相关CSS http://php.net/cached.php?t=1415938827&f=/fonts/Fira/fira.css

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn