2013-10-08 99 views
0

嗨我碰到以下代碼:.height480{ min-height:484px; min-height:497px\9;}我從來沒有見過反斜槓。我已經檢查了W3C文檔的最小高度,並且沒有提及它。任何人都知道嗎?我注意到,Firefox忽略它,所以猜猜它可能只是一個錯字?乾杯Dewd在CSS最小高度屬性中的反斜槓

+0

@BoltClock工作。感謝您將其識別爲dupe。谷歌搜索css \並沒有提出愚蠢的問題,當我寫這個問題時,答案建議也沒有提出。當時,我並沒有意識到數字9的重要性.CSS中的大多數數字是任意的。 – dewd

回答

1

它是一個IE破解

第一min-height工作對其他瀏覽器和明年min-height with slash會爲IE7,IE8,IE9和

see this site

.header {width:300px;height:200px;background:#000;} /* Applies to all browsers */ 
*.header {width:310px;height:200px;background:#000;} /* Applies to all IE browsers */ 
_.header {width:290px;height:200px;background:#000;} /* Applies to all IE browsers 6 and below */ 
.header {width /*\**/:330px\9;height:200px;background:#000;} /* Applies to IE 8 */ 
(Note: IE 8 and IE9 are a diffent animals, it is tying to act like web-kit. A tip of the hat to Safari and Crome.) 
+1

你能特別提醒\ 9做什麼嗎?它是否適用於早於IE9?如\ 8將早於IE8?還是我誤解? – dewd