Css 输入文本在Chrome、FF、Opera中是粗体的,但在IE6.0中不是。为什么?

Css 输入文本在Chrome、FF、Opera中是粗体的,但在IE6.0中不是。为什么?,css,internet-explorer,text,input,cross-browser,Css,Internet Explorer,Text,Input,Cross Browser,我删除了很多文本、按钮等,所以这个html页面看起来很简单。我仍然不明白,为什么IE6.0不将文本“在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&

我删除了很多文本、按钮等,所以这个html页面看起来很简单。我仍然不明白,为什么IE6.0不将文本“在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>

测验
输入[type='text']、输入[type='password']、输入[type='button']、输入[type='submit']、输入[type='file']、文本区域{
字体大小:16px;
字体大小:粗体;
}

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; }

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; }

你会建议忘记这个问题吗?它只适用于输入类型文本中的字体。有多少人使用IE6.0-?小于2%,另一种字体不重要。。。我只是在谷歌上搜索了一下,但我仍然不知道如何修复它。非常感谢。哎哟,看起来几倍于2%的审查率。。。2012年1月3日。@Haradzieniec根据具体情况,您可以使用
input{font-weight:bold;}
。如果不是的话,我认为IE6用户不会得到粗体文本也没什么大不了的。你会建议忘记这个问题吗?它只适用于输入类型文本中的字体。有多少人使用IE6.0-?小于2%,另一种字体不重要。。。我只是在谷歌上搜索了一下,但我仍然不知道如何修复它。非常感谢。哎哟,看起来几倍于2%的审查率。。。2012年1月3日。@Haradzieniec根据具体情况,您可以使用
input{font-weight:bold;}
。如果不是,我认为IE6用户不会得到粗体文本也没什么大不了的。