3
我跟着this SO answer将SVG包含在我的SVG中,但它不起作用。如何在SVG中包含自举图形
这就是我要实现的图标到SVG代码:
<text
ng-attr-x="{{node.width/2}}"
ng-attr-y="{{node.height/2+5}}"
text-anchor="middle"
ng-attr-fill="{{(node.activity.act_task==3 || node.activity.act_task==4)?'#FFFFFF':'#000000';}}">
<tspan x="130" dy="0em">&#e003</tspan>
<tspan x="130" dy="1.2em" ng-show="node.activity.act_type == 1 && node.height > 30"><a target="_blank" href="http://{{node.activity.act_info_url}}" style="text-decoration: underline">{{node.activity.act_info}}</a></tspan>
</text>
,我加入到我的CSS文件:
svg text{
font-family: 'Glyphicons Halflings';
}
但没有奏效,它只是显示&#e003
作为文本而不是搜索图标,我之后是glyphicon-search
图标。 我也试过/e003
& &e003
和#e003
但没有任何运气。
有没有一种方法可以在glyphicons中添加到svg组件中?
这工作,谢谢保罗! –