html - 字体没有出现

标签 html css fonts skeleton-css-boilerplate

我正在使用骨架网格系统,我按照网格文件中提供的 layout.css 文件中注释掉的说明更改页面的全局字体。我发现的问题是它没有覆盖 base.css 文件字体。

以下是我在 layout.css 文件中所做的更改:

enter image description here

然后我将文件夹“fonts”添加到根目录:

enter image description here

当我在本地运行页面时,出现base.css文件字体:

enter image description here

enter image description here

我是否只需要覆盖 base.css 文件?

最佳答案

@font-face 简单地声明您要使用的字体。要实际应用网络字体,请执行类似的操作。

body {
    font-family: 'HouschaAlt', helvetica, sans-serif;
}

我假设这个定义需要放在你的 base.css 文件中。

关于html - 字体没有出现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20827425/

相关文章:

css - 百的倍数的最大字体粗细值是多少

opengl - 用opengl写阿拉伯语文本

javascript - CSS 变换比例适合窗口大小

android - Android 版 Chrome 中的网站文字更大

jquery - 平滑滚动冲突 css3

javascript - document.styleSheets 什么都不返回

css - 字体粗细不能正常工作?

javascript - 我无法在 javascript 中使用 '\n",我不知道为什么它不起作用

CSS 重置 div 中的所有样式,但允许较低的样式覆盖它

css - Facebook Like 按钮错误 : Not displaying number of likes on big button