5

我在我的网站上使用 IcoMoon 图标,虽然它们在所有现代浏览器中都能完美运行,但它们在Internet Explorer 7中根本不起作用,在Internet Explorer 8中显示为小框。除了字体的相对路径之外,CSS 如下来自 IcoMoon:

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

我正在使用 data-icon 属性(例如<li data-icon="&#xe003;"><a href等)在我的导航中显示图标。

问题可能是什么?

4

3 回答 3

1

在 iconmoon 上生成图标时,转到首选项并检查对 ie6 和 ie7 的支持 选中此框

你会在你的字体中得到一个单独的 ie7 文件夹,然后在你的脑海中使用类似的东西。

<!--[if lte IE 8]>
        <link rel="stylesheet" href="ie7/ie7.css">
<![endif]-->

有两个文件可以使用 ie7.css 或 ie7.js

于 2015-05-05T15:37:23.397 回答
0

当我将Joomla 3x 与Bootstrap和 IcoMoon一起使用时,我一直在互联网上寻找这个自我相同困境的答案。它在 Internet Explorer 7 或 Internet Explorer 6 中也不起作用。根据这个Stack Overflow question您的问题可能是:

  1. zoom:1通过 CSS(Internet Explorer 专有)分配有问题的元素 hasLayout 。
  2. Internet Explorer 7的@font-face声明不同(在对问题的最后答复中概述)。
  3. 也可能是您的字体类型未得到正确支持。

而且我认为@Damonsson 指的是 Internet Explorer 的惊人能力,它永远不会按预期做任何事情......或要求......甚至恳求,哭泣乞求这样做。

狩猎愉快!

于 2013-06-15T03:05:23.953 回答
-1

以下内容可能会对您有所帮助。在 Internet Explorer 8 之前不支持 PPseudo 元素。我正在尝试自己解决 Internet Explorer 8 的困境......

http://icomoon.io/#docs/lte-ie7

于 2013-11-26T01:28:34.150 回答