下面这段代码中的CSS样式Chrome能显示出来,IE和Firefox均显示不出,这事为什么?

decoration.html:

<html>
<head>
<link rel = "stylesheet" type = "css/text" href = "decoration.css" />
</head>
<body>
<table align = "right">
<tr><th>Home</th></tr>
<tr><th>Info</th></tr>
<tr><th>Help</th></tr>
<tr><th>News</th></tr>
</table>
<h1>I <em>love</em> to decorate!</h1>
<p>I think that decorating <span class = "oops">cakes</span> HTML is lots of fun.Here are some of my favorites.
<div class = "text">
<p id = "a">Undelined text(don't you want to click here?)</p>
<p id = "b">Line-through text</p>
<p id = "c">Overlined text</p>
<p id = "d">Blinking text (this is hard to show in print!)</p>
</div>
</body>
</html>
--------------------------------------------------------------------------------
decoration.css
em {
text-decoration :underline ;
}
table {
border :1em solid fuchsia ;
font-weight :bold ;
font-family :ubuntu ;
}
.oops {
text-decoration :line-through ;
}
.text {
padding :2em 1em auto 2em ;
margin :3em 5em auto 1em ;
border :1px solid teal ;
}
#a {
text-decoration :underline ;
}
#b {
text-decoration :line-through ;
}
#c {
text-decoration :overline ;
}
#d {
text-decoration :blink ;
}
.text p {
width :25em ;
margin-right :2em ;
}
其中html和css均放在同一目录下

  您好,感谢您对火狐的支持

  在<link rel = "stylesheet" type = "css/text" href = "decoration.css" />中,css/text两属性颠倒了,建议安装Firebug,使用插件调试很容易发现这些问题。
  您可以在火狐官方网站下载火狐浏览器,在火狐社区了解更多内容。希望我的回答对您有所帮助,如有疑问,欢迎继续在本平台咨询。
温馨提示:内容为网友见解,仅供参考
第1个回答  2011-02-04
错误在于:
<link rel = "stylesheet" type = "css/text" href = "decoration.css" />
中的type属性应为"text/css",你写反了。本回答被提问者采纳
第2个回答  2011-02-04
不同内核对代码的支持能力不一样,尽量少用不兼容的代码吧
相似回答