我是 ruby 的新手,这里有一个删除按钮的代码
= xs_danger_btn_to "Verwijderen", time_keeper_employee_manager_role_path(@time_keeper, supervisor, manager_role), method: :delete, :btn_class => "custom"
我想将 xs_danger_btn_to
类更改为我自己的东西,例如颜色/悬停/边框等。在 CSS 中。我该怎么做?
我运行的是 ruby 版本:2.3.1p112
最佳答案
看起来您没有使用 ruby erb 的标准语法。你可以试试这个:
= link_to "Verwijderen", time_keeper_employee_manager_role_path(@time_keeper, supervisor, manager_role), method: :delete, :class => "insertyournewclass"
用你想要的任何类更改'insertyournewclass',例如:'btn btn-primary btn-sm'如果你使用 Bootstrap
关于css - 在CSS中更改按钮样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49852805/