【发布时间】:2014-07-06 15:43:07
【问题描述】:
我是一个我的 Rails 应用程序,我正在更改页面的 html 部分(localhost:3000/feeds),在文件 index.html.erb 中我以这种方式设置背景
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<style type="text/css">
body
{
background-image:url("../../assets/images/wwi.jpg");
}
</style>
</head>
</html>
目录是这样设置的:
->app
->assets
->images
->wwi.jpg
->views
->feeds
->index.html.erb
但是当我启动 rails 服务器并转到 localist:3000/feeds 时,没有背景(背景颜色没有问题)
【问题讨论】:
-
你确定路径正确吗?
标签: html css ruby-on-rails image background