Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.