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.