我在样式表中有一个背景图像url,我试图为索引页面中的标题呈现它。图像位于“资产/图像”文件夹中。我试着输入供应商/资产/图像,但它也没有从那里呈现。
视图/splash/index.html.haml:
%section.row.header-bg
.row
.col-md-6.col-md-offset-1资产/样式表/spash.css.scss:
.header-bg{
background-image: url('bg.png');
}编辑:我尝试了我能想到的图像URL的每一个变化,但到目前为止没有运气。
发布于 2015-05-04 19:42:47
问题解决了。正确的CSS:
.header-bg{
background: image-url('bg.png') no-repeat;
}发布于 2015-05-01 07:23:59
--请试着这样做--它会起作用的:
背景-图像:图像-url(‘bg.png’);
发布于 2015-04-30 23:32:51
试着这样做:希望这能帮助你!
background-image: url('images/bg.png');
or
background-image: url('assets/images/bg.png');https://stackoverflow.com/questions/29979329
复制相似问题