home > real world > web resource > web source codes >
This will put a trasparency on an image. IE and NS.
Put this code inside the <HEAD> of your document:
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
if ((navigator.appName.indexOf('Microsoft')+1)) {
document.write('<style type="text/css"> .opacity1 {filter:alpha(opacity=50)} .opacity2 {filter:alpha(opacity=100)} </style>'); }
if ((navigator.appName.indexOf('Netscape')+1)) {
document.write('<style type="text/css"> .opacity1 {-moz-opacity:0.5} .opacity2 {-moz-opacity:1} </style>'); }
else {
document.write(''); }
// End -->
</script>
</HEAD>
And add this code within the <IMG> tag:
<IMG src="color_wheel.jpg" border="0" class="opacity1" onmouseover="this.className='opacity2'" onmouseout="this.className='opacity1'">
|