2012-02-01 6 views
1

多くのテキストやボタンなどを削除しましたので、このhtmlページは簡略化して見えます。私はまだ理解していない、なぜIE6.0がテキストを表示しない "IE6.0で大胆ではない。なぜ?"太字で? ありがとうございます。入力テキストはChrome、FF、Operaでは太字ですが、IE6.0では太字ではありません。どうして?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html> 
<head> 
<title>Test</title> 
<style> 
input[type='text'], input[type='password'], input[type='button'], input[type='submit'], input[type='file'], textarea { 
    font-size:16px; 
    font-weight:bold; 
} 
</style> 
</head> 
<body> 
<input style="font-size:16px; font-weight:bold;" value="bold" type="text"> 
<input type="text" value="not bold in IE6.0. Why?"> 
</body></html> 

答えて

4

IE6は属性セレクタをサポートしていません。

/* So, this would work in IE6: */ 
input { font-weight: bold; } 

/* But IE6 won’t understand this: */ 
input[type="text"] { font-weight: bold; } 

/* If you combine the two, IE6 still won’t understand it! 
    It will drop the entire rule set, and it won’t apply any of its styles. 
*/ 
input, input[type="text"] { font-weight: bold; } 
+1

+1。これがhttp://www.ie6countdown.com/が存在する理由です。 ;) –

+0

この問題について忘れることをお勧めしますか?これは、入力タイプのテキストのフォント用です。 IE6.0を使用する人は何人ですか? 2%未満であり、他のフォントは重要ではありません...私はただそれをGoogleで検索しましたが、それを修正する方法はまだ分かりません。ありがとうございました。 Oooopsは、2012年1月3日のレビューでわずか2%以上の数のように思えます。 – Haradzieniec

+2

@Haradzieniec状況に応じて、あなたは 'input {font-weight:bold; } '。もしそうでなければ、私はIE6ユーザーが大胆なテキストを手に入れないことは大きな問題ではないと思います。 –

関連する問題