图像映射区域周围的不需要的边框

Abh*_*dev 5 html css maps image

我正在使用带有圆形区域的图像映射.问题是我在IE7区域周围有一个不需要的边框.此边框不会出现在FF和Chrome以及IE8/IE9中.

我尝试将border ="0"添加到图像,锚点的css属性即

a{ 
border:none !important;
outline:none !important;
}
Run Code Online (Sandbox Code Playgroud)

但没有奏效.

我还尝试添加IE修复onfocus ="blur();" 在标签中.这解决了IE中的问题,但现在FF获得了边界.搜索了很多,并通过此修复程序说,它将修复使用IE修复程序时FF的问题.

#parent_div *:active, #parent_div *:focus { overflow-x:hidden; outline:none; }
Run Code Online (Sandbox Code Playgroud)

但遗憾的是,即使这样也行不通.我使用的是FF 9.0.1.

任何帮助将不胜感激.提前致谢.

Mad*_*ela 3

img{border:none;}
Run Code Online (Sandbox Code Playgroud)

这是 ie 版本的修复

<!--[if lte IE 6]>
<script type="text/javascript">
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 & 6.
{

   var arVersion = navigator.appVersion.split("MSIE")
   var version = parseFloat(arVersion[1])
   if ((version >= 5.5) && (document.body.filters)) 
   {
      for(var i=0; i<document.images.length; i++)

      {
         var img = document.images[i]
         var imgName = img.src.toUpperCase()
         if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
            var imgID = (img.id) ? "id='" + img.id + "' " : ""

            var imgClass = (img.className) ? "class='" + img.className + "' " : ""
            var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "

            var imgStyle = "display:inline-block;" + img.style.cssText 
            if (img.align == "left") imgStyle = "float:left;" + imgStyle
            if (img.align == "right") imgStyle = "float:right;" + imgStyle

            if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
            var strNewHTML = "<span " + imgID + imgClass + imgTitle
            + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"

            + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
            + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
            img.outerHTML = strNewHTML

            i = i-1
         }
      }
   }    
}
window.attachEvent("onload", correctPNG);
</script>
<![endif]-->
Run Code Online (Sandbox Code Playgroud)

试试这个希望有帮助!