0

I've already found this post
How to add custom icon in Twitter Bootstrap? But applying that solution it still computes me a 0x0px icon, I still can't understand how that may be possible but here's my sample code:
HTML

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

CSS

.icon-linkedin {
    background-image: url("../../resources/img/icon-linkedins.png");
    background-position: center center;
}
4

1 回答 1

0

我已经有一段时间没有在 bootstrap 中创建了,但看起来现在的语法可能与发布该帖子时的语法有些不同。这就是您通常如何使用带有任何图标字体的元素(或者更确切地说是伪元素)的图标字体。

/* this just imports the font */
@import url(http://weloveiconfonts.com/api/?family=fontawesome);
.icon-linkedin:before {
    font-family: 'FontAwesome', sans-serif;
    content: "\f0e1"; 

}

演示

于 2013-09-16T21:59:57.043 回答