遍历SASS中未知长度的列表 [英] Loop through a list of unknown length in SASS

查看:57
本文介绍了遍历SASS中未知长度的列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想设置帖子列表的样式–我已经看到了很多很棒的示例,这些示例是在预定义列表时完成的

I want to style a list of posts – I have seen a lot of great examples of that being done when the list is predefined

(列表值为1,2,3 –循环执行某事)

(list values are 1,2,3 – loop through and do something)

我的问题是:是否可以通过SASS来获取列表长度?

My question is: if it's possible to pick up a list length through SASS?

推荐答案

SASS不会为CSS添加任何功能,只是使某些类型的CSS易于编写.如果您可以用CSS编写它,则可以使用SASS.如果不是,则不是.

SASS doesn't add any functionality to CSS, it just makes some kinds of CSS simpler to write. If you can write it in CSS, it's possible with SASS. If not, it isn't.

这篇关于遍历SASS中未知长度的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆