鉴于历史遗留问题的复杂性,IE 6.0的暮年或许会以不确定的方式延续下去,MSIE仍然以一副大佬的模样考验着无数设计师的敬业程度。网络上可以收集到的解决IE6.0样式标准差异性问题(被大伙号称bug)的方案大多是针对单一的局部问题,还有很多问题仍然困扰着众多designers。
有幸在参阅<<CSS Mastery (ISBN978-7-115-15316-6)>>一书时获得了解决这些bug 的clue。书中作者提到Dean Edwards的IE7补丁,“这是一系列javascript文件,它们使IE 5-6/Win(CSS解读标准)能够接近IE7的水平..."。以下是Dean Edwards提供的网址 http://dean.edwards.name/IE7/ 上的内容:
/*:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
IE7 { css2: auto; }
version: 2.0 (beta)
IE7 is a JavaScript library to make MSIE behave like a standards-compliant browser. It fixes many CSS issues and makes transparent PNG work correctly under IE5 and IE6.
I will update this page shortly as I have made some important changes to this project .
IE7 provides Microsoft Internet Explorer with support for W3C standard CSS and HTML:
- supports the following CSS selectors:
- parent > child
- adjacent + sibling
- adjacent ~ sibling
- [attr], [attr="value"], [attr~="value"] etc
- .multiple.classes (fixes bug)
- :hover, :active, :focus (for all elements)
- :first-child, :last-child, only-child, nth-child, nth-last-child
- :checked, :disabled, :enabled
- :empty, :contains(), :not()
- :before/:after/content:
- :lang()
- supports imported style sheets
- preserves the cascade of the style sheet
- does not alter the document structure
- does not repeatedly query the DOM tree using JavaScript
- uses pure CSS to enforce style sheet rules
- supports the W3C box model in both standards and quirks mode
- supports fixed positioning (flicker free)
- supports overflow:visible
- supports min/max-width/height
- fixes broken (X)HTML elements (abbr, object)
- standardised forms behavior
- supports PNG alpha transparency
- lightweight script (11KB)
- works for Microsoft Internet Explorer 5+ (Windows only)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
p.s. 在千万大众正从IE6.0向更符合W3C标准的MS更高版本浏览器过渡的时期,在客户与技术之间妥协的时期,多一种解决的方案,也许就会影响甚至决定一个企业当时当下冬眠期的长短。