2011-02-11 36 views
0

我遇到了CssSandpaper腳本的問題。一旦我在我的網站的一個頁面上運行它,我得到以下錯誤:CssSandpaper庫錯誤 - 規則對象爲空

"rules is null" in FF, 
"Error: 'rules.length' is null or not an object" in IE, 
"Uncaught TypeError: Cannot read property 'length' of null" in Chrome, 

所以基本上對象'規則'是未定義的。這裏是CSS我的div(ID = 「textTransform」):

#textTransform { 
border: 1px solid green; 
-sand-transform: rotate(90deg); 
width: 23px; 
height: 74px; 

}

你們當中有誰遇到過這樣的問題?任何幫助將非常感激。

謝謝

回答

0

好的。我懂了。該庫獲取HTML中「元」部分中「鏈接」標籤中列出的所有參考。我有這行定義一個鏈接圖標:

<link rel="shortcut icon" href="/favicon.ico" /> 

的圖標是不存在的服務器和它的迴應是404這就是原因。一旦我刪除它開始工作。

1

對於我來說,兩件事情與csssandpaper.js和其他css砂紙庫所需的腳本結合導致了「未捕獲的異常錯誤」。

  1. html5doctor.com重置樣式表
  2. Typekit JS

卸下這兩個除去誤差