zoukankan      html  css  js  c++  java
  • IE6下png格式图片显示问题

    一开始是使用

    _filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/bgBtn.png'); /* IE6 */ _ background-image: none; /* IE6 */

    来修正,后来发现这样会导致input被遮盖住,无法进行点击,据说加个position:relative能解决,测试没效,不晓得什么问题,而且这几个元素已经加了个position:absolute。

    so,继续找插件滴干活

    使用IE6下PNG图片透明插件DD_belatedPNG.js,用法很简单,和jquery的语法相似:能使IE6支持显示png透明图片,而且还支持背景循环(background-repeat)和定位(backgrond-position) ,支持focus,Hover。

    引用地址:

    <script type="text/javascript" src="http://www.candoudou.com/js/DD_belatedPNG.js"> </script

    下载到本地加载也行。

    修复页面上的所有PNG图片:
    DD_belatedPNG.fix('*');

    ID选择器:
    DD_belatedPNG.fix('#png');

    伪类:
    DD_belatedPNG.fix('.png a:hover,.png a:focus');

    img标签:
    DD_belatedPNG.fix('img');

    如果是多个直接加逗号(英文下的)就行:
    DD_belatedPNG.fix('.png_bg,#png,.png a:hover,.png a:focus,img');

     还有一个问题就是

    IE6PNG透明问题引发的relative定位冲突

    IE6下父元素改为_position:static,其他浏览器position:relative(触发z-index有效)

    具体参考:http://www.cocss.com/564.html

  • 相关阅读:
    Xaml下
    Xmal
    ItemTemplate
    spring aop
    Struts2
    jsp的标签库
    数据库连接池
    request初探
    kubectl 命令大全
    win10常见问题归总
  • 原文地址:https://www.cnblogs.com/canrz/p/3533194.html
Copyright © 2011-2022 走看看