Jade Inline Conditional

后端 未结 7 1598
你的背包
你的背包 2021-01-31 15:43

I\'m trying to make everything apart from the first element in an array have a CSS class using the Jade templating engine.

I was hoping I could do it like this, but no l

相关标签:
7条回答
  • 2021-01-31 16:38

    This works too:

    div(class="#{i===0 ? 'span13' : 'span13 offset3'}")
    
    0 讨论(0)
提交回复
热议问题