twitter-bootstrap-rails on Heroku: Glyphicons displayed as squares

后端 未结 3 1536
长情又很酷
长情又很酷 2021-02-03 15:44

I have deployed a rails app on Heroku, and I am using the twitter-bootstrap-rails gem to include twitter bootstrap. Everything works perfectly locally (and in the development en

3条回答
  •  庸人自扰
    2021-02-03 16:30

    Make these changes in your bootstrap.css file:

    somewhere around line 1174:

    -  background-image: url("../img/glyphicons-halflings.png");
    +  background-image: image-url("glyphicons-halflings.png");
    

    and somewhere around line 1183:

    -  background-image: url("../img/glyphicons-halflings-white.png");
    +  background-image: image-url("glyphicons-halflings-white.png");
    

    I think that'll do the trick.

提交回复
热议问题