开发者

Change back color of every row of a table in ruby on rails

开发者 https://www.devze.com 2023-04-01 03:58 出处:网络
I want to change the backcolor of every rowsof a table but I am not quite sure what is the best way to do it. Personally, I want to change on backcolor with ruby codes,but i dont know how :(

I want to change the backcolor of every rows of a table but I am not quite sure what is the best way to do it. Personally, I want to change on backcolor with ruby codes,but i dont know how :(

here is my code:

<% @word.each do |w| %>
                <% i=0 %>
                <% i=i+1 %>
                <% if i % 2==0 %>
 ........

Thank you for your helps

Ba开发者_StackOverflow中文版bak


Use cycle it's exactly what you need.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号