2014-04-25 82 views
0

我试图在内容之前合并CSS。 我希望把信息图标(我),这是 “\ E608”CSS内容在某些情况下不起作用

#securityCodeLink:before { 
    content: "\e608"; 
} 

输出看起来像这样

e608

但如果我尝试用2701或类似的东西

#securityCodeLink:before { 
    content: "\2701"; 
} 

它工作得很好。

2701

任何一个可以告诉我这是为什么,我该如何解决这一问题?

+0

你加FONT-FAMILY? –

+0

是的,我有字体家族。 – Neo

+0

font-family:“Helvetica Neue”,Helvetica,Arial,sans-serif; – Neo

回答

1

只有当您使用支持该字体的字体时才会显示该图标。

在计算器上(它使用的font-familyArial, 'Liberation Sans', 'DejaVu Sans'):

\e608呈现为

\2701呈现为ઍ

0

我研究了很多关于这一点,最后它得到解决。如果您正在使用支持它特定的字体

图标才会出现。 在CSS中,我们需要定义如下的字体。

@font-face{ 
font-famiy:'nameOfFont'; 
src: url(data:application/font-woff;charset=utf-8;base64______format("woff"); 
} 

.requiredFont input[type=radio]{ 
    font-family: nameOfFont; 
    display: inline-block; 
    text-decoration: inherit; 
} 
.requiredFont input[type=radio]{ 
    content: "\E608"; 
} 

.requiredFont input[type=radio]:checked { 
    content: "\E609"; 
    color: reqired HEX Color; 
} 

最有可能它会工作...我们在设计中单选按钮,我们想要的内容的字体..

相关问题