以文本方式查看主题 - 咿思舞论坛 (http://bbs.145829.com/index.asp) -- 『网站资源』 (http://bbs.145829.com/list.asp?boardid=8) ---- IE6出现重复字符的bug(注释bug、3pixbug) (http://bbs.145829.com/dispbbs.asp?boardid=8&id=781) |
-- 作者:admin -- 发布时间:2011/11/17 15:04:26 -- IE6出现重复字符的bug(注释bug、3pixbug) 一个容器包含2两个具有“float”样式的子容器。
![]() ![]() <!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --><!DOCTYPE html public "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="Keywords" content="YES!B/S!,web标准,杨正祎,博客园,实例代码" /> <meta name="Description" content="这是一个简单YES!B/S!文章示例页面,来自杨正祎的博客,http://justinyoung.cnblogs.com/" /> <title>YES!B/S!文章示例页面</title> </head> <body> <div style="width:200px;"> <div style="float:left;"></div> <!-- 如果是IE6,你将多看到一个“影”字 --> <div style="float:left;width:200px;">歌剧院的魅影</div> </div> </body> </html>
IE6浏览器对<!-- -->注释的解释存在bug引起的。 如何消灭重复文字 针对于上文中讲到的“bug重现条件”,如果要修正bug,只要让任何一个条件不满足即可—— 改变结构,不出现【一个容器包含2两个具有“float”样式的子容器】的结构。 Holly \'n John 于2004年2月18号发表的一篇文章: 《Explorer 6 Duplicate Characters Bug 》,这是关于此bug比较权威的一篇文章。 |