如何更改图像映射区域元素样式

Dav*_*hao 4 css image map

我在我的网页和iPad应用程序上使用图像映射.图像地图上的每个区域都是一个可点击的元素来制作声音,我可以使用jQuery轻松完成.但我无法改变样式,如显示边框,或更改填充颜色只是为了表示单击该区域.如果有人这样做,请告诉我; 看起来很简单,但我真的很难过.

Dav*_*hao 6

感谢James Treworgy非常棒的ImageMaster Jquery插件,我得到了它的工作.

$('area').mousedown(function(e) {
   $(this).mapster('set',true);
});

$('area').mouseup(function(e) {
   $(this).mapster('set',false);
});

$('area').bind( "touchstart", function(e){
   $(this).mapster('set',true);
});

$('area').bind( "touchend", function(e){
   $(this).mapster('set',false);
});
Run Code Online (Sandbox Code Playgroud)