How to remove error about glyphicons-halflings-regular.woff2 not found

后端 未结 6 1075
夕颜
夕颜 2020-12-12 18:50

ASP.NET MVC4 Bootstrap 3 application is running from Microsoft Visual Studio Express 2013 for Web IDE.

Chrome console shows always error

http://local         


        
6条回答
  •  盖世英雄少女心
    2020-12-12 19:26

    This problem happens because IIS does not find the actual location of woff2 file mime types. Set URL of font-face properly, also keep font-family as glyphicons-halflings-regular in your CSS file as shown below.

    @font-face {
    font-family: 'glyphicons-halflings-regular'; 
    src: url('../../../fonts/glyphicons-halflings-regular.woff2') format('woff2');}
    

提交回复
热议问题