2009-08-07 42 views
0

我想知道如何不Internet Explorer 6的解釋如下:的Internet Explorer 6(urgh)和CSS - 將多個類的樣式

p img.blue, p img.red { 
    border:(purple) 1px solid; /* (Please ignore any style errors) */ 
} 

我所感興趣的多種類別的應用以相同的風格。我知道IE6不能正確解釋以下內容:

p img.blue.red { 
    border:(purple) 1px solid; /* (Please ignore any style errors) */ 
} 

有沒有人知道這個問題?問候和TIA。

//編輯:

請注意,我詢問的一個代碼塊。

回答

4

IE解釋

p img.blue,對img.red {/ * * /}

正確地,通過應用含有樣式的img帶有class = 「藍色」,其是p個元素, IMG元件與類的子元素=「紅色」,它們是p元素的子元素。

IE不明白p img.blue.red,也只是在樣式應用至P img.red

1

我只是引述瑞安布里爾:

IE6不明白的類CSS選擇器內的鏈,而只讀取最後一堂課

+0

所以,如果我理解正確的話,它解釋: p img.blue,對IMG。紅色邊框:(紫色)1px實心;/*(請忽略任何樣式錯誤)*/ } as p img.red {border} :(紫色)1px solid;/*(請忽略任何款式錯誤)*/ } 這是正確的嗎? – 2009-08-07 08:50:17

+0

不,它會正確解釋p img.blue,p img.red(.blue *或* .red)。它不正確地解釋p img.blue.red(p img.red) – 2009-08-07 08:55:25