Twitter引导和优雅的图标呈现双图标

时间:2014-12-31 15:15:28

标签: css twitter-bootstrap fonts icons icon-fonts

当我在html中插入图标​​时,图标会呈现两次。我不确定为什么图标输出两次。我尝试了很多不同的方法来纠正这个无济于事。我不确定为什么会发生这种情况。

HTML输入:

<div class="icon">
    <i class="icon_cloud-upload_alt"></i>
</div>

CSS:

@font-face {
    font-family: 'ElegantIcons';
    src:url('../fonts/ElegantIcons.eot');
    font-weight: normal;
    font-style: normal;
}

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

.icon_cloud-upload_alt {
    font-family: 'ElegantIcons';
    speak: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}

.icon_cloud-upload_alt:before {content: "\e003";}

浏览器(Chrome和IE和Safari):

enter image description here

干杯。

2 个答案:

答案 0 :(得分:0)

您不需要两次声明.eot文件。您似乎可以删除第一个@ font-face。

答案 1 :(得分:0)

只需删除 HTML 代码中的 lte-ie7.js 或任何带有 elegant-font.zip 的 javascript 文件。