1
下面的代碼是一個按鈕,使一個AJAX調用。我試圖添加CSS到按鈕無濟於事。CSS來button_to_remote軌功能
<%= button_to_remote "Close sales period",:url=>{:controller=>'admin',:action=>"closure"},:class=>"button close" %>
.close_sales_period
{
background: url(/images/buttons/close_sales_period.gif) no-repeat;
}
.button
{
padding:0;
border:0;
width:152px;
height:26px;
font-size:0px;
cursor:pointer;
text-indent:-9999px;
text-transform: capitalize;
color:transparent;
display:inline;
background-repeat:no-repeat;
}
這樣做的正確方法是什麼?