Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 是否有从Fontastic显示图标的引导程序?/Font图标显示为空白_Html_Css_Fonts_Icons - Fatal编程技术网

Html 是否有从Fontastic显示图标的引导程序?/Font图标显示为空白

Html 是否有从Fontastic显示图标的引导程序?/Font图标显示为空白,html,css,fonts,icons,Html,Css,Fonts,Icons,我试图在我的网站上使用我自己的图标而不是图像,但当我从Fontastic或Iconmoon加载图标时,它在chrome或safari中都不起作用,我需要引导还是代码中有错误 这是来自Fontastic的CSS @font-face { font-family: "untitled-font-1"; src:url("untitled-font-1.eot"); src:url("untitled-font-1.eot?#iefix") format("embedded-opentyp

我试图在我的网站上使用我自己的图标而不是图像,但当我从Fontastic或Iconmoon加载图标时,它在chrome或safari中都不起作用,我需要引导还是代码中有错误

这是来自Fontastic的CSS

@font-face {
  font-family: "untitled-font-1";
  src:url("untitled-font-1.eot");
  src:url("untitled-font-1.eot?#iefix") format("embedded-opentype"),
    url("untitled-font-1.woff") format("woff"),
    url("untitled-font-1.ttf") format("truetype"),
    url("untitled-font-1.svg#untitled-font-1") format("svg");
  font-weight: normal;
  font-style: normal;
}
以及我是如何尝试调用图标的

<i class="icon-closeicon"></i>

在添加自定义图标字体(如中的某个字体)时,您必须做一些事情

  • 使用导入字体

  • 请确保您正在导入必要的css规则(ex.
    。图标位置:在{content:“\e947”}
    之前)

  • 确保元素具有正确的值(刚才加载的图标字体)

  • 确保元素具有正确的
    .class
    名称(您希望调用的图标名称)

我怀疑您遗漏了其中一个步骤(尤其是考虑到您在问题中没有链接代码)