css - 在CSS中更改按钮样式

标签 css ruby haml

我是 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/

相关文章:

html - 我想制作一张高清图片作为我的响应式背景

javascript - 将网页中的图像打印在彼此之上

CSS3 变换 : rotateY a div to counter the rotateY of the parent

javascript - 使用 Rails 和 Haml 的 Jquery 和 CoffeeScript scrollTo

css - 正斜杠在 CSS 字体速记中是什么意思?

ruby - Redmine 安装 Apache2 Bundler PermissionError

ruby - 类中的常量 << self block

python - Ruby/Python 中是否有 OpenSource BASIC 解释器?

ruby-on-rails - 使用 haml 以 formattastic 添加标签/提示的链接

html - 使用 HAML 使关闭和打开 div 标 checkout 现在同一行