我正在为 IE6 使用以下 PNG 修复程序,但它似乎对我不起作用:
http://www.dillerdesign.com/experiment/DD_belatedPNG/
它以前可以工作,但我不确定我做错了什么。
我在 .NET 环境中工作,我的所有 JS 都像这样引用:
<%= Html.Script("~/Scripts/jquery-1.4.2.min.js")%>
<%= Html.Script("~/Scripts/jquery-ui-1.8.2.custom.min.js")%>
<%= Html.Script("~/Scripts/Plugins/jquery.colorbox-min.js")%>
<%= Html.Script("~/Scripts/Plugins/jquery.jqtransform.js")%>
<%= Html.Script("~/Scripts/Plugins/jqPrint.js")%>
<%= Html.Script("~/Scripts/Plugins/jquery.print.colorbox.js")%>
<%= Html.Script("~/Scripts/Plugins/jquery.mousewheel.min.js")%>
<%= Html.Script("~/Scripts/Plugins/jScrollPane-1.2.3.min.js")%>
<%= Html.Script("~/Scripts/Plugins/jquery.tools.min.js")%>
<%= Html.Script("~/Scripts/icis.dashboard.js")%>
<%= Html.Script("~/Scripts/icis.pricereport.js")%>
<%= Html.Script("~/Scripts/PriceAssessment/tooltip.js")%>
<!--[if lt IE 7]>
<script type="text/JavaScript" src="../../Scripts/DD_belatedPNG_0.0.8a-min.js" defer="defer"></script>
<script type="text/JavaScript" src="../../Scripts/DD_PNG_listing.js" defer="defer"></script>
<![endif]-->
但是,PNG 修复似乎不起作用。所有 24 位 PNG 都呈现 IE6 灰色背景。
不过,条件注释似乎确实适用于 CSS:
<!--[if lte IE 8]>
<link rel="stylesheet" href="../../Content/styles/icis.dashboard.ie.css" type="text/css" media="screen, projection"/>
<![endif]-->
我的 PNg 列表文件是这样的:
//------------------------------------------- set up string of CSS selectors
//---------- IMPORTANT: each line (*except the last*) must end with a comma
var listing = ''
listing += '.dark_overlay,'
listing += '#icis_dashboard #header h1,'
listing += '#icis_dashboard .widget,'
listing += '#icis_dashboard .widget .fly_out,'
listing += '#icis_dashboard .widget .inline_list li,'
listing += '#icis_dashboard .w_price_history .tabs li,'
listing += '#icis_dashboard .w_price_history .tabs li a,'
listing += '#icis_dashboard .w_price_history .tabs li a span,'
listing += '#icis_dashboard .ui-datepicker-trigger,'
listing += '#cboxLoadingOverlay,'
listing += '#cboxLoadingGraphic,'
listing += '#cboxClose,'
listing += '.cboxIE #cboxTopLeft,'
listing += '.cboxIE #cboxTopCenter,'
listing += '.cboxIE #cboxTopRight,'
listing += '.cboxIE #cboxBottomLeft,'
listing += '.cboxIE #cboxBottomCenter,'
listing += '.cboxIE #cboxBottomRight,'
listing += '.cboxIE #cboxMiddleLeft,'
listing += '.cboxIE #cboxMiddleRight,'
listing += '#dialog_head ul li,'
listing += '.jqTransformRadio,'
listing += '.jqTransformRadioWrapper a.jqTransformChecked,'
listing += 'a.jqTransformCheckbox,'
listing += 'span.jqTransformCheckboxWrapper a.jqTransformChecked,'
listing += '.jqTransformSelectWrapper,'
listing += '.jqTransformSelectWrapper a.jqTransformSelectOpen,'
listing += '#dialog_head ul li'
//------------------------------------------- call function
DD_belatedPNG.fix(listing)
我会使用独立版,但没有注册表访问权限来打开 IE6 独立版的条件注释。