【IE6的疯狂之七】样式中文注释后引发失效

这是ie6 出现的奇怪现象。这是由于css 和html 的编码不同所引致。

满足下面条件就会引起 注释下面的样式不起作用:
1. css有中文注释
2. css为ANSI编码
3. html为utf-8编码

解决方法:
1. 去掉中文注释,用英文注释
2. 统一css 和 html 的编码

建议采用第二种解决方法

ps: css为uft-8  html 为ANSI 不会出现失效的情况。

参考文章:冯子胡说 的 http://vontall.blogbus.com/logs/4366443.html

=
posted @ 2011-04-28 15:35  likozhang  阅读(207)  评论(0编辑  收藏  举报