簡體   English   中英

在軌道上使用ruby引導靜態資產

[英]bootstrap static assets with ruby on rails

在bootstrap.css中有一行

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

我該怎么替換這個url才能使它在rails上使用ruby

您應該使用適當的gem而不是自己鏈接twitter bootstrap。

如果您想修改您的bootstrap.css以在Rails中使用asset-pipeline,您必須找到並替換所有類型為"../img/glyphicons-halflings.png"引用:

url(gliphicons-halflings.png) 

確保您的.png文件位於由資產管道管理的目錄中,如本Rails指南中所述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM