两种解决方案:一种,叠加另一个图像。除了您要突出显示的区域外,叠加图像将是透明的,并且不透明度设置得足够低以仍然可以看到它后面的内容。第二,使用真实图像作为上述'覆盖'图像的背景图像(覆盖图像必须具有已经半透明的覆盖区域而不是使用css)。
例如(版本一)
<span class='image_container'>
<img id='base_image' src='base.png' >
<img id='overlay_image' src='overlayimage.png' usemap='#yourmaphere'>
<map name='yourmaphere'>
...
</map>
</span>
.image_container {
position:relative;
}
#overlay_image {
position:absolute;
top:0;
left:0;
opacity:0.5;
filter: alpha(opacity = 50);
/* text-decoration: blink; */ /*optional*/
}
例如(第二版)
<img id='base_image' src='overlayimage.png' usemap='#yourmaphere'>
<map name='yourmaphere'>
...
</map>
#base_image {
background: transparent url(base.png) no-repeat scroll top left;
}