Css 使用基础5将背景图像添加到轨道4

Css 使用基础5将背景图像添加到轨道4,css,ruby-on-rails-4,zurb-foundation,Css,Ruby On Rails 4,Zurb Foundation,我想在Rails 4应用程序中添加背景图像。我使用的是foundation railsgem版本5.4.5.0 我有一个div类content将我的收益包装在application.html.erb中 以下是css: .content { margin-top: 60px; background-image: url("/images/brickwall_@2X.png"): repeat; } 尝试将代码更改为背景图像:url('brickwall_u@2X.png')。Ra

我想在Rails 4应用程序中添加背景图像。我使用的是
foundation rails
gem版本5.4.5.0

我有一个div类
content
将我的收益包装在application.html.erb中

以下是css:

.content {
    margin-top: 60px;
    background-image: url("/images/brickwall_@2X.png"): repeat;
}

尝试将代码更改为
背景图像:url('brickwall_u@2X.png')
。Rails会在资产管道中自动搜索资产/图像文件夹中的图像文件,因此如果它是,则图像会保存在资产/图像中,你不需要告诉Rails去哪里。

请注意,图像在app/assets/images中,css在app/assets/stylesheets/application.css中。
:repeat
对于背景图像是无效的语法。您可能需要使用
后台
并删除第二个
。如果您将其更改为
background:url(“/images/brickwall_@2X.png”),请重复有效吗?我做到了,但仍然无效。