【问题标题】:Custom styles for Bootstrap 3 button in Ruby on RailsRuby on Rails 中 Bootstrap 3 按钮的自定义样式
【发布时间】:2014-04-01 18:34:57
【问题描述】:

在我的 Ruby on Rails 4 应用程序中为 bootstrap 3 按钮创建自定义样式时遇到问题。 我有以下链接:

= link_to t('car_configurations.index.add'), { action: :new }, class: "btn btn-lg btn-default"

我的 css.scss 文件有以下样式:

.btn-default {
  background: #ec6523;
  color: #fff;
  border: 0px;
}

.btn-default:hover {
  background: #333;
  color: #eee;
  border: 0px;
  outline: none;
}

.btn-default:active {
  outline: none;
  background: #333;
}

.btn-default:focus {
  background: #ec6523;
  color: #fff;
  outline: none;
}

问题是这个样式不适用于这个按钮。怎么了?

【问题讨论】:

标签: html css ruby-on-rails twitter-bootstrap


【解决方案1】:

尝试在引导后加载 CSS

<head>
<link href="bootstrap.css" rel="stylesheet">

然后

<link href="YOUR.css" rel="stylesheet">
</head>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-27
    相关资源
    最近更新 更多