1
我想在我看來嵌套div標籤
<div class="progress ">
<div class="progress-bar bgclre3559b" role="progressbar" style="width:80%">
<span><%= top_cat.first %></span>
</div>
<div class="progress-bar bgclre3559b" role="progressbar" style="width:15%">
<span class="clrfff"><%= "#{top_cat.last}%" %></span>
</div>
</div>
達到這個HTML代碼,我想這一個,但它只能說明裏面的第二個div。有沒有辦法連接它們或如何正確顯示在rails方式。
content_tag :div, class: "progress" do
content_tag :div, class: "progress-bar bgclre3559b", role: "progressbar", style: "width: 80%" do
content_tag :span, top_cat.first
end
content_tag :div, class: "progress-bar bgclre3559b", role: "progressbar", style: "width: 15%" do
content_tag :span, "#{top_cat.last}%"
end
end
在此先感謝!