0
問題在標題中非常多。是否可以在sass中使用html屬性?
我不知道這是可能的,似乎並不能使它工作,但我可能忽略了一些(我希望)
這是我的顏色選擇功能混入的thingie
=colors($color)
@if #{$color} == 0
background: transparent
@if #{$color} == 1
background: #87dcec
@if #{$color} == 2
background: #72d856
@if #{$color} == 3
background: #f7e818
@if #{$color} == 4
background: #f75149
@if #{$color} == 5
background: #303030
@if #{$color} == 6
background: #fff1da
@if #{$color} == 7
background: #75430a
@if #{$color} == 8
background: #0e7259
這是我@for
@for $i from 1 through 143
li:nth-child(#{$i})
float: left
width: 50px
height: 50px
$color: #{attr(color)}
+colors($color)
所以,我的上海社會科學院已決定,如果的顏色,因爲我甚至不使用8又是古怪只使用最後。
是的,我有一個名爲color
喔,謝謝...但我不想要使用LESS,因爲我想學SASS:D – Mobilpadde 2012-08-06 00:15:15