• 对于IE6版本图片透明。


     1 <!DOCTYPE html>
     2 <html>
     3     <head>
     4         <meta charset="utf-8">
     5         <title></title>
     6         <script src="js/DD_belatedPNG_0.0.8a.js"></script>
     7         <script>
     8             DD_belatedPNG.fix("body");<!--由于js文件不能直接的对body进行操作所以需要引进filter 即15以及16行代码-->
     9         </script>
    10         <style>
    11             body{
    12                 width: 500px;
    13                 height: 500px;
    14                 background:red url("img/png.png") no-repeat;
    15                 _background-image:none;<!--只需要将背景图片设置为none否则红色的背景就会消失-->
    16                 _filter : progid:DXImageTransform.Microsoft.AlphaImageLoader(src="img/png.png", sizingMethod="crop");
    17             }<!--需要filter来滤掉图片-->
    18         </style>
    19     </head>
    20     <body>
    21     </body>
    22 </html>



     1 <!DOCTYPE html>
     2 <html>
     3     <head>
     4         <meta charset="utf-8">
     5         <title></title>
     6         <script src="js/DD_belatedPNG_0.0.8a.js"></script>
     7         <script>
     8             DD_belatedPNG.fix("img, div");<!--引用js文件对img和div进行操作-->
     9         </script>
    10         <style>
    11             body{
    12                 background-color: red;
    13             }
    14             div{
    15                 width: 300px;
    16                 height: 300px;
    17                 background: url("img/png.png") no-repeat;
    18             }
    19         </style>
    20     </head>
    21     <body>
    22         <div></div>
    23         <img src="img/png.png" alt="" />
    24     </body>
    25 </html>
    
    
    
     
  • 相关阅读:
    linux系统常用命令
    python文件处理
    Python按行读文件
    向脚本传递参数-shift命令
    shell脚本中一些特殊符号
    标准make变量 MAKE_VERSION, CURDIR
    makefile "=" ":=" "?=" "+="
    静态资源映射
    Spring MVC的常用注解
    SpringMVC项目的快速搭建
  • 原文地址:https://www.cnblogs.com/hduhdc/p/5236325.html
Copyright © 2020-2023  润新知