Removing outline on image map area

前端 未结 7 1288
攒了一身酷
攒了一身酷 2020-12-14 01:38

Is there anyway to remove the outline when you select an area on an image map? See: \"enter

相关标签:
7条回答
  • 2020-12-14 01:50

    So if you have an archaic webpage without css (I know awful!) you can fix it by inserting style="outline:none" after the coords and before the href within the area tag- absolute perfection!

    0 讨论(0)
  • 2020-12-14 01:53

    I was having this same issue with both chrome and safari and found success by assigning a class .map to each area tag and giving the class the following style:

    .map {
    outline: 0;
    }
    
    0 讨论(0)
  • 2020-12-14 01:55

    Tried outline:0 on its css rule ?

    0 讨论(0)
  • 2020-12-14 02:03

    It seems like all you got to do to remove these borders lies on the img tag, by setting the hidefocus attribute and the outline css property on it like this:

    HTML

    <img class="map" src="..." usemap="..." hidefocus="true" />
    

    CSS

    img.map, map area{
        outline: none;
    }
    

    This should work cross-browser!

    EDIT

    Like Sergey K commented, if you're not looking to support IE6 you can save bytes by just using an attribute selector.

    img[usemap], map area{
        outline: none;
    }
    

    Support starts with IE7.

    0 讨论(0)
  • 2020-12-14 02:03

    Give your imagemap an id of "Map" then use the following CSS declaration:

    #Map area {
        outline: none;
    }
    
    0 讨论(0)
  • 2020-12-14 02:04

    Kinda old-fashioned, but does this work:

        <area onfocus="blur();" ... 
    

    ?

    GTX, CS

    0 讨论(0)
提交回复
热议问题