0

我正在尝试将 css 识别为“.jumbotron h1”或“.jumbatron .lead”

<div class="jumbotron">
            <h1>Thousands of clinical guidelines!</h1><br>
            <p class="lead">GuidelinesForMe is a free, crowd-sourced database with links to online clinical treatment guidelines. It currently has <%= Guideline.all.count %> guidelines.</p>
                <%= link_to main_path, class: "btn btn-large btn-success" do%>
                                See all guidelines


<% end %>
      </div>

但它在一个带有“jumbotron”类的 div 中,但它<h1>本身只显示为 h1,而不是“jumbotron h1”——这对<p>等也是 同样的问题

有些东西压倒了它,但我不知道如何解决......

my_styles.css is 

/* Main marketing message and sign up button */
.jumbotron {
  margin: 20px 0;
  text-align: center;
}
.jumbotron h1 {
  font-size: 100px;
  line-height: 1;
}
.jumbotron .lead {
  font-size: 24px;
  line-height: 1.25;
}
.jumbotron .btn {
  font-size: 21px;
  padding: 14px 24px;
}

我的 application.css 是

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the top of the
 * compiled file, but it's generally better to create a new file per style scope.
 *
 *= require_self
 *= require bootstrap
 *= require bootstrap-responsive
 *= require guidelines
 *= require my_styles

 */
4

0 回答 0