整理:

railslink_to的字符如何改变颜色

<%= link_to "my test", :controller=> 'test', :action => 'test' %>

默认颜色是蓝色的,想要改成白色的,哪位知道怎么改


答:<%= link_to "mytest", {:controller => 'test', :action =>'test'},:style=>"color:red" %>



<div style="background-p_w_picpath: url('/user/p_w_picpaths/mypage/live_order_btn_1.jpg'); width: 166px; height: 30px">

       <p style = "padding-left: 35px;padding-top: 6px;">

        <%=link_to(t('mypage.live_order_btn'),{:action => "course_order", :id => @course.id, :back_action => params[:action]},:style=>"color:white;font-weight: bold")%>  

       </p>

      </div>