Jquery image background transparency (IE5, IE6, and IE7 supported)

Source: Internet
Author: User

Jquery image background transparency (ie5, ie6, and ie7 supported)

Set a background image to highlight the effect of transparency and jquery png background transparent plug-in instance tutorial

 

<Head>
<Title> toggle () </title>
<Style type = "text/css tutorial">
<! --
Body {

Background: url(bg.jpg );
Margin: 20px; padding: 0px;
}
Img {
Border: 1px solid # ffffff;
}
-->
</Style>
<Script language = "webpage effects" src = "jquery. min. js"> </script>
<Script language = "javascript">
$ (Function (){
$ ("Img"). toggle (
Function (oevent ){
Certificate (oevent.target).css ("opacity", "0.5 ");
},
Function (oevent ){
Certificate (oevent.target).css ("opacity", "1.0 ");
}
);
});
</Script>
</Head>
<Body>

</Body>

The following shows a jquery png background transparent plug-in.

<Head>
...
<Script type = "text/javascript" src = "jquery-1.3.2.min.js"> </script>
<Script type = "text/javascript" src = "query.png fix. pack. js"> </script>
<Script type = "text/javascript">
$ (Document). ready (function (){
Optional (document).png fix ();
});
</Script>
...
</Head>

The plug-in not only supports the png background transparency of img labels under ie5, ie6, and ie7, but also the background transparency of background-image. It also supports the png background transparency of image-type input and achieves precise control, that is, you can make the background of any png image on the page transparent without affecting others.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.