【发布时间】:2019-08-16 00:29:20
【问题描述】:
我在浏览器控制台中收到错误为 ::
glyphicons-halflings-regular.woff2:1 Failed to load resource: the server responded with a status of 404 (Not Found)
glyphicons-halflings-regular.woff:1 Failed to load resource: the server responded with a status of 404 (Not Found)
glyphicons-halflings-regular.ttf:1 Failed to load resource: the server responded with a status of 404 (Not Found)
当我检查元素时,我看到 ::
::before == $0
这是什么意思?
inspect 元素中的 css 显示::
a[aria-expanded="false"]::before, a[aria-expanded="true"]::before {
content: '\e259';
display: block;
position: absolute;
right: 20px;
font-family: 'Glyphicons Halflings';
font-size: 0.6em;
}
a[aria-expanded="true"]::before {
content: '\e260';
}
content: '\e259'是什么意思; ?
【问题讨论】:
-
content: '\e259'是一个菜单向下图标。来自 glyphicon:.glyphicon-menu-down:before { content: "\e259"; }。它只是将图标链接到您的 css 的特殊字符值:css-tricks.com/snippets/html/glyphs -
如果你最近从 Bootstrap 3.x 升级到 4.x,你应该记住他们从框架中删除了图标支持 - 你现在需要导入你喜欢的任何图标包。
标签: css asp.net twitter-bootstrap glyphicons