zoukankan      html  css  js  c++  java
  • Bootstrap 3 Glyphicons are not working

    Bootstrap 3 Glyphicons are not working

    解答1

    Note to readers: be sure to read @user2261073's comment and @Jeff's answer concerning a bug in the customizer. It's likely the cause of your problem.


    The font file isn't being loaded correctly. Check if the files are in their expected location.

    @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');
    }

    As indicated by Daniel, it might also be a mimetype issue. Chrome's dev tools show downloaded fonts in the network tab:

    chrome network tab font download

    解答2

    -If you followed the highest rated answer and it's still not working:

    The Font folder MUST be on the same level as your CSS folder. Fixing the path in bootstrap.css will not work.

    Bootstrap.css has to navigate to the Fonts folder exactly like this:

    @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');
    }
    
  • 相关阅读:
    ldap和phpldapadmin的安装部署
    Django Model基础操作
    vmware_vcenter_api
    salt-api使用
    【如何设置博客园好看的标题样式】
    【我的python之路】
    8.20 总结
    抽象类和接口
    java 值传递 数组传递
    JAVA 构造函数 静态变量
  • 原文地址:https://www.cnblogs.com/chucklu/p/11082411.html
Copyright © 2011-2022 走看看