mCY*_*mCY 0 css ruby-on-rails link-to
谢谢你的时间!
我有一个代码:
<link href="/stylesheets/show.css" media="screen" rel="stylesheet" type="text/css">
<div id="body-container">
<div id="left-column">
<ul id="report-list">
<% for report in @reports %>
<li><%= link_to( report, {:controller => 'loadreport',
:action => 'get_report_content',
:test_name => report} )%></li>
<% end %>
</ul>
</div>
<div id="right-column">
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
该link_to方法将生成如下的html标签:
<a href="/loadreport/get_report_content?name=Test1">Test1</a>
Run Code Online (Sandbox Code Playgroud)
我想做一些装饰tag a.所以在CSS文件中,我得到了这些代码:
a:link { text-decoration: none;}
a:hover {text-decoration-color: #adff2f;}
Run Code Online (Sandbox Code Playgroud)
它无法添加这些装饰tag a.我认为这是因为tag arails link_to方法生成的.我们没有tag a提前.我对吗?那怎么能实现这个呢?
你能试试这个:
a { text-decoration: none; }
a:hover { color: #adff2f; }
Run Code Online (Sandbox Code Playgroud)