Ruby on Rails Bootstrap Glyphicons not working

后端 未结 17 2080
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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-02 08:44

    Provided that you have the glyphicons files in app/assets/fonts (if you don't, you can download them from the bootstrap-saas repo), create app/assets/stylesheets/fonts.scss and add the following:

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

提交回复
热议问题