• 解决IE6下透明图片有背景的问题


    描述,透底的图片,在其他浏览器中效果:
    在IE6中的效果:
     
    1.改图片
    IMG
    换用gif格式的图片,但是这样的话图片效果不好:
    想让IE6用gif的图片,其他浏览器用png图片,但是只有IE有这样的条件选择代码,其他好像没有。
      
    <!--[if !IE 6]>
              <img src="img/foot_logo_xiu_v2.png" alt="">
              <![endif]-->
              <!--[if IE 6]>
              <img src="img/foot_logo_xiu_v2.gif" alt="">
              <![endif]-->
    2用js来实现
    代码:
    <img id="foot_logo" src="img/foot_logo_xiu_v2.png" alt="">
    <!--[if IE 6]>
              <script type="text/javascript" src="js/DD_belatedPNG-min.js"></script>
              <script>
              DD_belatedPNG.fix("#foot_logo");
              </script>
              <![endif]-->
     
    js文件下载:http://pan.baidu.com/share/link?shareid=4098229612&uk=1174479539
     
    图片需要给个id="foot_logo"
     
    这样就好了。是不是很简单?
     
     
    背景
     
    背景就不用通过js来处理了。可以直接用针对IE6的hack来处理。
    当然,处理背景也有对应的js插件可以用。
    学透前端行业所有技术,玩遍北京周边所有城市。然后我会回到那个生我养我的地方,因为有亲人的地方才是家。
  • 相关阅读:
    linux基础知识-17
    linux基础知识-16
    linux基础知识-15
    linux基础知识-14
    linux基础知识-13
    phone 调试三种工具
    ANT_HOME is set incorrectly or ant could not be located .Please set ANT_HOME.
    如何解决google ping不通的问题。
    weinre targets none 的问题
    phonegap3.5了结
  • 原文地址:https://www.cnblogs.com/snowinmay/p/3161327.html
Copyright © 2020-2023  润新知