2017-04-05 71 views
2

我有下面的代码,并希望我怎么能做到这一点的笔如何使手写笔更有效

CSS

h1 { 
    font-size: 36px 
} 
h2 { 
    font-size: 32px 
} 
h3 { 
    font-size: 28px 
} 
h4 { 
    font-size: 24px 
} 
h5 { 
    font-size: 20px 
} 
h6 { 
    font-size: 16px 
} 

​​

首先将环路标题,然后鼻子,因为我会做另一个字体大小的循环

+0

手写笔的文档并不建议你可以用'为... in'生成规则选择,只有属性:http://stylus-lang.com/docs/iteration.html – Dai

回答

1
size= 36px 32px 28px 24px 20px 16px 
for num,$s in size 
    h{$s+1} num 

点击here用于演示

+0

格拉西亚斯! funcionóperfectamente – Raul