Set background picture to highlight transparency effects and jquery png background transparent plugin instance tutorial
<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= "Web Effects" src= "Jquery.min.js" ></script>
<script language= "JavaScript" >
$ (function () {
$ ("img"). Toggle (
function (oevent) {
$ (oevent.target). CSS ("opacity", "0.5");
},
function (oevent) {
$ (oevent.target). CSS ("opacity", "1.0");
}
);
});
</script>
<body>
</body>
See a jquery PNG background transparent plugin below
...
<script type= "Text/javascript" src= "Jquery-1.3.2.min.js" ></script>
<script type= "Text/javascript" src= "Query.pngfix.pack.js" ></script>
<script type= "Text/javascript" >
$ (document). Ready (function () {
$ (document). PngFix ();
});
</script>
...
Plug-ins not only support IE5/IE6/IE7 under the IMG tag PNG background transparent, background-image background transparent, but also support the image type of input PNG background transparent, but also achieve precise control, That is, you can make any PNG picture on the page transparent and otherwise unaffected.