【发布时间】:2016-11-28 20:44:19
【问题描述】:
我在使用折叠按钮时遇到问题。我正在尝试在按钮上显示一个字形图标,并在我单击它时使其更改。折叠时的向右箭头和向下箭头。在其他页面上,字形图标起作用。这个虽然在导航栏上。它显示为一个盒子,里面有十六进制代码。我已经看了几个小时的问题,他们几乎错过了字体系列。我有一部分正在工作,所以它有所不同,我找不到问题。
<button type="button" aria-expanded="false" class="btn navbar-toggle collapsed" data-toggle="collapse" data-target="#navigation">
<span class="sr-only">Ouvrir la navigation</span>
</button>
这是字形图标工作的 css 部分:
.liens:before {
content: "\e144";
font-family: 'Glyphicons Halflings';
font-size: 12px;
float: left;
margin-top: 0;
margin-left: -20px;
color: #2A3E53;
}
我可以在 ul 中的每个项目上看到字形图标,但在导航上我有完全相同的 css,但它显示为一个带有十六进制代码的框,即:e250
button.btn.collapsed:before {
content: "\e250";
font-family: 'Glyphicons Halflings' !important;
font-size: 12px;
float: left;
color: #2A3E53;
}
button.btn:before {
content: "\e252";
font-family: 'Glyphicons Halflings' !important;
font-size: 12px;
float: left;
color: #2A3E53;
}
这就是我得到的:
【问题讨论】:
-
你确定 'Glyphicons Halflings' 有这个 Unicode 定义吗?
-
它在website here 上。那么必须是“在这里获取专业版”。感谢您指出这一点。
标签: html css twitter-bootstrap glyphicons