2015-02-23 69 views
0

我无法理解如何解决为什么我的浏览器(谷歌浏览器和Safari浏览器)忽略背景图像。我可以看到在开发工具中正确构建的url,但它被删除(重要的覆盖仍然失败)。这里是我的代码:在rails 4.1中的背景图像渲染问题

body { 
    background-image: image-url('blue.jpg') no-repeat center center fixed 
} 

该图像存储在应用程序/资产/图像。

一如既往,非常感谢任何帮助。

回答

0

尝试删除图像的URL,只是使用URL

body { 
background-image: url('blue.jpg') no-repeat center center fixed 
} 
0

我结束了设置图像作为背景,而不是一个背景图像:

body { 
    background: asset_url('blue.jpg') no-repeat center center fixed; 
    color: ... 
    margin: ... 
    padding: ... 
} 

我不明白为什么这个工程然而。