我想一次呈现我的项目列表 3,以便它们以三行输出。我正在使用
<div class="row">
<div class="three columns">
<% @items.each do |f|%>
<div class="item">
<%= f.content %>
</div>
<% end %>
</div>
</div>
它在一个“行”中输出所有规则 -
<div class="row">
<div class="three columns">
<div class="item">
This is the content
</div>
<div class="item">
This is the content
</div>
<div class="item">
This is the content
</div>
<div class="item">
This is the content
</div>
<div class="item">
This is the content
</div>
</div>
</div>
我想要做的是为每三个返回的项目输出一行,所以 -
<div class="row">
<div class="three columns">
<div class="item">
This is the content
</div>
<div class="item">
This is the content
</div>
<div class="item">
This is the content
</div>
</div>
</div>
<div class="row">
<div class="three columns">
<div class="item">
This is the content
</div>
<div class="item">
This is the content
</div>
<div class="item">
This is the content
</div>
</div>
</div>
谢谢