我有CSS内容值的问题。它根本不显示,只是代码,就像图片中一样。任何人都可以解释导致它的原因吗我会尝试修复它,而不在此处发布代码。自定义字体不适用于:在伪元素在CSS之前
HTML:
<a href="#"><i class="icon-map-marker"></i> Atlanta</a>
CSS:
.icon-map-marker:before{
content: "\f041"
}
@font-face {
font-family: 'FontAwesome';
src: url('fontawesome-webfont.eot');
src: url('fontawesome-webfont.eot') format('embedded-opentype'),
url('fontawesome-webfont.woff?') format('woff'),
url('fontawesome-webfont.ttf') format('truetype');
font-weight: normal;
font-style: normal
}
[class^="icon-"], [class*=" icon-"] {
font-family: FontAwesome;
font-weight: normal;
font-style: normal;
text-decoration: inherit;
-webkit-font-smoothing: antialiased;
display: inline;
width: auto;
height: auto;
line-height: normal;
vertical-align: baseline;
background-image: none;
background-position: 0 0;
background-repeat: repeat;
margin-top: 0
}
你为什么不包括字体,真棒CDN链接<链接HREF =“// netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome。 css“rel =”stylesheet“>并使用那里定义的类而不是手动包含源eot和ttf – bring2dip