Css html.erb不使用引导样式

Css html.erb不使用引导样式,css,ruby-on-rails,twitter-bootstrap,Css,Ruby On Rails,Twitter Bootstrap,My index.html.erb不使用Twitter的引导风格。如果没有引导,这个表看起来非常难看,因为斑马条纹的引导类显然无法识别 但在我看来,其他文件都是自举的,所以问题就出在这段代码中 为什么会这样 <table class="zebra-striped"> <tr> <th>Name </th> </tr> <% @students.each do |student| %> <tr>

My index.html.erb不使用Twitter的引导风格。如果没有引导,这个表看起来非常难看,因为斑马条纹的引导类显然无法识别

但在我看来,其他文件都是自举的,所以问题就出在这段代码中

为什么会这样

<table class="zebra-striped">
  <tr>
    <th>Name </th>
  </tr>

<% @students.each do |student| %>
  <tr>
    <td><%= student.name %></td>
  </tr>
<% end %>
</table>

阅读文档将有助于解决标记问题

您还应该将表标记得更标准一些

<table class="table table-striped">
  <thead>
  <tr>
    <th>Name </th>
  </tr>
  </thead>

  <tbody>
  <% @students.each do |student| %>
    <tr>
      <td><%= student.name %></td>
    </tr>
  <% end %>
  </tbody>
</table>

我不明白为什么这不是一个真正的问题。也许这不是一个好问题,但问题很清楚。
<table class="table table-striped">
  <thead>
  <tr>
    <th>Name </th>
  </tr>
  </thead>

  <tbody>
  <% @students.each do |student| %>
    <tr>
      <td><%= student.name %></td>
    </tr>
  <% end %>
  </tbody>
</table>