Bootstrap Icons not showing in published ASP.NET MVC application

后端 未结 17 1985
孤城傲影
孤城傲影 2021-01-30 11:30

--- NB: Go to the EDITED 2 section for summary ----

I have an ASP.NT MVC (4) application. I integrated (twitter)Bootstrap to it. Bootstrap is working perfectly, but the

17条回答
  •  孤独总比滥情好
    2021-01-30 11:36

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

    It might also be a mimetype issue. Chrome's dev tools show downloaded fonts in the network tab:

    chrome network tab font download

    The bootstrap customizer seems to be sending different sized fonts than the ones that are inside the whole bootstrap package that comes with the examples. If you use customized bootstrap, try replacing font files..

    Update

    You get a status code 304 which represents "not modified static files that downloaded or in client cache." So its related to client cache and requires some peek into iis.

    This will be helpful in solving your issue

提交回复
热议问题