png格式的图片在IE6透明显示

 

             1。今天在看Jquery插件的使用中,看见让png格式的图片能在IE6下透明显示。。。哈哈!!!就立刻跟大家分享了。。。

 

 

          <html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="Scripts/jquery-1.4.1.min.js"></script>
    <script type="text/javascript" src="Scripts/jquery.simplemodal-1.4.1.js"></script>
    <style type="text/css">
    #simplemodal-container a.modalCloseImg {
    background:url(image/x.png) no-repeat; /* adjust url as required */
    width:25px;
    height:29px;
    display:inline;
    z-index:3200;
    position:absolute;
    top:-15px;
    right:-18px;
    cursor:pointer;
}

    /*****IE6下*****/
    #simplemodal-container a.modalCloseImg {
        background:none;
        right:-14px;
        width:22px;
        height:26px;
        filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(
            src='image/x.png', sizingMethod='scale'
        );
    }


    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input id="test" type="button" onclick="test_onclick();" value="测试" />
        <div id="dialog" style="display:none;"><img src="Image/BlueWayImg.jpg" /></div>
    </div>
    <script type="text/javascript">
        function test_onclick() {
            $("#dialog").modal();
        }
    </script>

    </form>
</body>
</html>

 

 

你可能感兴趣的:(png格式的图片在IE6透明显示)