将字形重新添加回引导程序 4.0



嗨,我使用一个名为 minton 的引导程序主题,它使用字体真棒处理图标。我认为这是一个引导 3/4 的事情。

简而言之:这个 boostrap 4.0 缺少 glypicons。我想添加它们。太多的依赖项需要它们。我在字体目录中有字形字体

  • asssets/fonts/glyphicons-halflings-regular.eot
  • asssets/fonts/glyphicons-halflings-regular.svg
  • asssets/fonts/glyphicons-halflings-regular.tff
  • asssets/fonts/glyphicons-halflings-regular.woff

而bootstrap.min.css在这里 -asssets/css/bootstrap.min.css

我通过图标将此 css 添加到页面.css(除其他外(现在有

@font-face {
font-family: 'Glyphicons Halflings';
src: url('../fonts/glyphicons-halflings-regular.eot');
src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
}

但它们不会在请求时显示。谁能阐明这一点?

Bootstrap 4 不再有 glyphicons,所以如果你使用 boostrap 4,则需要找到另一种解决方案(例如 font-awesome(

您提到了日期选择器库,该库支持引导程序 2 和 3,并且它提到它被折旧以支持这个库:https://eonasdan.github.io/bootstrap-datetimepicker/

您最好的选择是更换该组件,而不是尝试改造某些旧库的某些部分以使另一个最终需要更换的旧库正常工作。你不妨早点把它联系起来。无论如何,工作都需要完成,它可能在某种程度上是面向未来的。

最新更新