General discussion

Locked

Can I put transparent Color Over Image

By sancreations ·
Hi all,

Facing a new problem, I have an Image(.gif/.jpg) on my Html page, I want to create HotSpots On Some Parts Of That Image. I am able to create links at desired positions but i want "On Mouse Over to that link The ForeGround Color shud comeand the portion of the image behind it shud also be visible" / "or a kind of Transparent Color shud come".

If Somebody could help me out in this, it will be a great help.

Thanx

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

change images

by shelleydoll In reply to Can I put transparent Col ...

You have to create two images, one normal, and one with the transparancy or whatever, then use javascript to swap them out with the mouseover stuff. Try something like this:

<SCRIPT LANGUAGE="JavaScript">
<!--
function changeImages() {
if (document.images) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments].src = changeImages.arguments;
}
}
}

------- then, in your link definition in the body: -----

<a href="http://blah.com/index.html" ONMOUSEOVER="changeImages('imgname', './img/imgname_alt.jpg'); return true;" ONMOUSEOUT="changeImages('imgname','./img/imgname.jpg'); return true;"><img name="imgname" src="./img/imgname.jpg" border=0></a>

----------------------------------------

Hope this helps!

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums