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');
    }
    
  • 相关阅读:
    <魔域>按键精灵脚本
    Windows下Java环境变量配置
    JDBC简单范例
    迅雷高速通道被举报无法下载问题
    wifi入侵思路
    连接WiFi工具类
    ActionBar+Fragment实现顶部标签页
    Fragment的基本用法
    opencv-python识别人脸
    string.Join 拼接在sql中特殊处理
  • 原文地址:https://www.cnblogs.com/chucklu/p/11082411.html
Copyright © 2011-2022 走看看