JS解決ie6下png透明方法

來源:互聯網
上載者:User

  解決ie6下png透明的問題想必前端都比較清楚,雖然有很多方法,但是我覺得用JS還是最省事的方法,不管是圖片還是背景圖片都OK。

<!DOCTYPE html><html lang="en"><head><title>解決ie6下png透明方法之JS法-</title><style type="text/css">.a{background: #FFFF99 ;  background-image: url(bg.jpg); height:800px;padding: 50px;  }.b{ float: left;  background: url(tra.png) no-repeat 0 0; width:240px; height:307px; margin-right:20px;} </style><!--[if IE 6]> //只有IE6才調用<script src="http://jt.875.cn/js/iepng.js" type="text/javascript"></script> //此處調用透明的JS<script type="text/javascript">   EvPNG.fix('div, ul, img, li, input');  //EvPNG.fix('包含透明PNG圖片的標籤'); 多個標籤之間用英文逗號隔開。</script><![endif]--></head><body><div class="a">    <div class="b">           <p>875商機匯</p>      <p><a href="http://www.875.cn">www.875.cn</a></p>      <p>上邊的連結可以點開喲</p>   </div><!--背景調用-->      <img src="tra.png" width="240"  height="307" alt="" /><!--頁面插入圖片--></div></body></html>

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.