We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2019-08-16 11:55:30
使用递归调用来循环
.loop(@n) when (@n > 0) { div:nth-of-type(@{n}){ width: (@n*10px); height: 40px; background: red; margin: 10px; font-size: 12px; } .loop(@n - 1); } .loop(5);
div:nth-of-type(5) { width: 50px; height: 40px; background: red; margin: 10px; font-size: 12px; } div:nth-of-type(4) { width: 40px; height: 40px; background: red; margin: 10px; font-size: 12px; } div:nth-of-type(3) { width: 30px; height: 40px; background: red; margin: 10px; font-size: 12px; } div:nth-of-type(2) { width: 20px; height: 40px; background: red; margin: 10px; font-size: 12px; } div:nth-of-type(1) { width: 10px; height: 40px; background: red; margin: 10px; font-size: 12px; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
2019-08-16 11:55:30
使用递归调用来循环
less 编译前
css 编译后
The text was updated successfully, but these errors were encountered: