Ruby on Rails Bootstrap Glyphicons not working

后端 未结 17 2079
Happy的楠姐
Happy的楠姐 2020-12-02 07:43

I have added bootstrap to my site. Here is the structure I am using. (I cannot whatsoever remove the bootstrap.css file since it I modified it to my liking).



        
17条回答
  •  时光说笑
    2020-12-02 08:21

    You can also try this:

    @font-face {
      font-family: 'Glyphicons Halflings';
    
      src: url('<%= asset_path("glyphicons-halflings-regular.eot") %>');
      src: url('<%= asset_path("glyphicons-halflings-regular.eot?#iefix") %>') format('embedded-opentype'), url('<%= asset_path("glyphicons-halflings-regular.woff2") %>') format('woff2'), url('<%= asset_path("glyphicons-halflings-regular.woff") %>') format('woff'), url('<%= asset_path("glyphicons-halflings-regular.ttf") %>') format('truetype'), url('<%= asset_path("glyphicons-halflings-regular.svg#glyphicons_halflingsregular") %>') format('svg');
    }
    

    You just need to convert your your_css.css file to your_css.css.erb

提交回复
热议问题