Jump to content

imagemap


foxe

Recommended Posts

Hello,

 

i know this isn´t php but the site i´m coding is php.

well, i´ve got some problems with imagemap.

this is my css:

 

area.pictureopacity img

{

filter:alpha(opacity=100); 

-moz-opacity: 1.0; 

opacity: 1.0;

}

 

area.pictureopacity:hover img

{

filter:alpha(opacity=50);

-moz-opacity: 0.5;

opacity: 0.5;

}

 

and here is the php function:

 

<?php

function showImage($image)

{

$prev = "img1.jpg";

$next = "img3.jpg";

 

$path = "gallery/".$image;

 

list($imgWidth, $imgHeight, $type, $attr) = getimagesize($path);

$onethird = $imgWidth / 3;

$twothirds = $onethird * 2;

 

echo " <map name='picture'>

<area class='pictureopacity' shape='rect' coords='1,1,".$onethird.",".$imgHeight."' href='index.php?image=".$prev."'>

<area class='pictureopacity' shape='rect' coords='".$twothirds.",1,".$imgWidth.",".$imgHeight."' href='index.php?image=".$next."' >

</map>

 

<center><img src='".$path."' usemap='#picture' style='border:1px solid black;'></center>

    ";

}

?>

 

 

so how can i use the css opacity in imagemap? i want 50% opacity when i hover the two areas.

please help!

Link to comment
https://forums.phpfreaks.com/topic/64259-imagemap/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.