Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在mthaml的类中声明一个变量,从我读过的内容来看应该这样做:
$columns = 3 %div{:class => "columns large-#{$columns}"}
然而,这打印:
<div class="columns large-">
对我来说,似乎有几种方法可以达到你的目标:首先你这样做:
- set columns = 3
接着:
%div{:class => "columns large-#{columns}"}
或者
%div(class="columns large-#{columns}")
.columns(class="large-#{columns}")