【发布时间】:2016-04-20 20:33:50
【问题描述】:
我的任务是从引导 glyphicon 元素(例如“\e020”)获取代码。
我尝试了以下方法:
html:
<div id="glyph" class="glyphicon glyphicon-trash"></div>
js:
$( document ).ready(function() {
console.log(window.getComputedStyle($('#glyph')[0], ':before').content);
});
但是这里我只能实现字符本身,而不是原始代码。
有没有办法得到"\e020"这个字符串?
【问题讨论】:
标签: javascript twitter-bootstrap twitter-bootstrap-3 glyphicons