0
我正在使用Susy框架爲我的網站創建一個網格,我非常喜歡它。 我不明白爲什麼#margin-left:-1em被添加,當我在跨度列中使用歐米茄。 我似乎無法找到任何有關它的信息,當我驗證css時,它會引發此錯誤:.second解析錯誤#margin-left:-1em;Susy Compass歐米茄正在添加#margin-left:-1em;
我的代碼看起來像下面
//this is the default number of columns
$total-columns: 12;
//width of each column
$column-width : 4em;
//space between columns
$gutter-width : 1em;
//space on the right and left of the grid
$grid-padding : $gutter-width;
.first{
@include span-columns(6,12);
}
.second{
@include span-columns(6 omega,12);
}
,並生成該
.first {
width: 49.15254%;
float: left;
margin-right: 1.69492%;
display: inline;
}
.second {
width: 49.15254%;
float: right;
margin-right: 0;
#margin-left: -1em;
display: inline;
}
感謝您的回覆。這很奇怪,不知道爲什麼地雷編譯成#而不是*。我將禁用對IE 6-7的支持,並在需要時手動添加代碼。 – Allan 2013-04-09 05:06:46
它在最新版本中從'#'更改爲'*'。看[這個提交](https://github.com/ericam/susy/commit/0c11935559a5ff1a20d8800499028ca120a3baf3)。 IE在達到亞像素數學時會變圓,所以佈局可能會中斷,除非您給予它們額外的呼吸空間。 '-1em'爲他們提供了那個空間,而且由於'omega'元素是正確的,大多數人甚至沒有注意到。您可以使用Compass [瀏覽器支持](http://compass-style.org/reference/compass/support/)設置關閉任何攻擊:'$ legacy-support-for-ie6','$ legacy-support- for-ie7「,或者更普通的」$ legacy-support-for-ie「。 – 2013-04-09 06:10:02
非常感謝您的幫助和解釋。我已升級到最新版本的Susy並且現在顯示*。 – Allan 2013-04-09 06:28:36