php - Icomoon字体下载错误

标签 php css

进入网站时出错

enter image description here

@font-face {
    font-family: 'icomoon';
    src:url('icon-fonts/icomoon.html');
    src:url('icon-fonts/icomoond41d.html?#iefix') format('embedded-opentype'),
        url('icon-fonts/icomoon-2.html') format('truetype'),
        url('icon-fonts/icomoon-3.html') format('woff'),
        url('icon-fonts/icomoon.svg#icomoon') format('svg');
    font-weight: normal;
    font-style: normal;
}

如何克服这个错误?

编辑:

我已经使用了这段代码,即使在本地系统中也没有显示任何图标

@font-face {
font-family: 'icomoon';
src:url('icon-fonts/icomoon.eot');
src:url('icon-fonts/icomoon.eot?#iefix') format('embedded-opentype'),
url('icon-fonts/icomoon.woff') format('woff'),
url('icon-fonts/icomoon.ttf') format('truetype'),
url('icon-fonts/icomoon.svg#icomoon') format('svg');
font-weight: normal;
font-style: normal;
}

建议我现在做什么?

最佳答案

您使用了错误的语法。

你应该链接到实际的字体文件......而不是页面

它应该看起来像这样:

@font-face {
  font-family: 'MyWebFont';
  src: url('webfont.eot'); /* IE9 Compat Modes */
  src: url('webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
       url('webfont.woff2') format('woff2'), /* Super Modern Browsers */
       url('webfont.woff') format('woff'), /* Pretty Modern Browsers */
       url('webfont.ttf')  format('truetype'), /* Safari, Android, iOS */
       url('webfont.svg#svgFontName') format('svg'); /* Legacy iOS */
}

关于php - Icomoon字体下载错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33437176/

相关文章:

javascript - 平滑的水平和垂直滚动

PHP 网站转换为静态 HTML 网站 - 链接问题

PHP 搜索查询不工作

CSS float div 固定边距顶部

css - 使并排表格匹配高度

javascript - 我只想在列表中显示一次重复项并删除其他项

php - 使用php和mysql计算时间戳

php - 计算两个时间戳之间停电的Mysql查询

php - 是否有适用于 iPhone 的 PHP 和 MySQL 软件开发工具包?

html - "../"和 "~/"相对路径的区别