ruby on rails link_to字体颜色变更

整理:

railslink_to的字符如何改变颜色

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

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


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



<div style="background-image: url('/user/images/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>


你可能感兴趣的:(style,color,action,如何)