【问题标题】:glyphicons CSS not loading字形CSS未加载
【发布时间】: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


【解决方案1】:

你有导入 Bootstrap 吗?

确保正确导入引导程序。

https://getbootstrap.com/docs/4.3/getting-started/introduction/

【讨论】:

    猜你喜欢
    • 2013-08-27
    • 1970-01-01
    • 1970-01-01
    • 2018-05-29
    • 2013-08-28
    • 2020-08-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多