2011-11-13 22 views
1

我在HTML設計中很新手,並且很難理解爲什麼我的網頁設計不會顯示正確的字體。如果我使用此代碼:當我使用本地Dojo CSS時,爲什麼我的網站不會顯示正確的字體?

<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/dojo/1.5/dijit/themes/claro/claro.css"> 
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/dojo/1.5/dojox/grid/resources/Grid.css"> 
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/dojo/1.5/dojox/grid/resources/claroGrid.css"> 
<link rel="stylesheet" href="css/style.css"> 

字體顯示正確。但是,如果我使用本地拷貝的Dojo 1.6.1,請使用以下代碼:

<link rel="stylesheet" href="../dojo161/dijit/themes/claro/claro.css"> 
<link rel="stylesheet" href="../dojo161/dojox/grid/resources/Grid.css"> 
<link rel="stylesheet" href="../dojo161/dojox/grid/resources/claroGrid.css"> 
<link rel="stylesheet" href="css/style.css"> 

它不會爲html body顯示相同的字體。 我做錯了什麼?

謝謝, PS:我已經檢查使用谷歌瀏覽器的WebKit,資源(*。的CSS)是訪問

+0

你可以檢查鉻並找出什麼規則(S)缺失(至少當涉及到字體)? – hugomg

+0

如果您將DSN版本從1.5更改爲1.6,會發生什麼情況? – hugomg

+0

@Smamatti:對不起,我的錯。 sytle.css不會丟失。我將編輯我的問題 – swdev

回答

2

1.5已在claro.css比1.6.1不同的定義。

.claro { 
    font-family:Verdana,Arial,Helvetica,sans-serif; // <-- !!! 
    font-size: .688em; 
    color: #131313; 
} 

.claro .dijitCalendarDateTemplate { 
    font-family: Arial; 
    // ... 
} 

/* h1 to h6, p, ol, ul etc. diffes in for example: 
    - font-size 
    - font-weight 
    - line-height 
*/ 
+1

這些樣式是Claro的document.css是由claro.css導入的(因此在1.5版本中被平鋪),但是這是一個錯誤,因爲它包含了可能與站點現有基礎樣式相沖突的基礎樣式,因此,那個導入在1.6中被取出,但是資源仍然存在。如果你仍然想要這些樣式爲1。 6,加載dijit/themes/claro/document.css除了claro.css。 –

+0

不錯!一個非常明確的解釋@smamatti。現在清楚了。 – swdev

+0

感謝@KenFranqueiro的提示!目前我堅持1.5。但是,您的提示使我更容易遷移到1.6 – swdev

相關問題