在Spoon.net IE6中修复IE6 PNG不再有效

时间:2010-07-21 11:03:18

标签: css internet-explorer-6 iepngfix

我正在为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独立版打开条件注释。

1 个答案:

答案 0 :(得分:0)

这是因为我在.NET MVC环境中,并修复了这个:

<!--[if lt IE 7]>
        <script type="text/JavaScript" src="<%= Url.Content("~") %>Scripts/DD_belatedPNG_0.0.8a-min.js" defer="defer"></script>
        <script type="text/JavaScript" src="<%= Url.Content("~") %>Scripts/DD_PNG_listing.js" defer="defer"></script>
    <![endif]-->