【问题标题】:Stylus multiple loop iterators手写笔多个循环迭代器
【发布时间】:2014-03-10 13:50:34
【问题描述】:

是否可以在 Stylus 中实现类似的功能?

for $i in 1..5 and $n in a b c d e
  .icon-{$i}:before{
    content: $n 
  }

【问题讨论】:

标签: stylus


【解决方案1】:

回答你的问题:是的。


方法如下:http://codepen.io/anon/pen/jIbdq

icon_contents = ( "a" "b" "c" "d" "e" )

for v, k in icon_contents
  .icon-{k+1}:before
    content v

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-10-24
    • 2012-07-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多