【发布时间】:2013-08-03 01:09:16
【问题描述】:
我想从视图中更改表头背景颜色,这样当我单击表头 URL 时,它的背景颜色会发生变化。
我在 Haml 中有这个恢复视图:
%table#movies
%thead
%tr
%th= link_to "Movie Title", movie_path, :id => "title_header" -#this is the table header
这是我想在点击“电影标题”后应用到表头的 CSS 样式:
table#movies th {
background-color: yellow;
}
我不知道如何将点击与表头背景颜色绑定。 这个问题是从一个在线课程中得到的,它是一个家庭作业,我们不能使用 javascript
【问题讨论】:
标签: html css ruby-on-rails ruby haml