简体   繁体   English

如何将LESS变量传递给类名

[英]How to pass a LESS variable into a class name

I have a LESS variable: @columns: 12 我有一个LESS变量: @columns: 12

I would like to pass this variable into a CSS class name ideally as: .one-{@columns}-inner {} 我想将此变量理想地传递给CSS类名: .one-{@columns}-inner {}

Is it possible? 可能吗?

Simply you can do it this way: 你可以这样做:

// Using variables
.one-@{columns}-inner {
    color: black;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM