删除图像地图区域的轮廓 [英] Removing outline on image map area

查看:88
本文介绍了删除图像地图区域的轮廓的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当你在图像地图上选择区域时,是否有删除轮廓?请参阅:

我在Snow Leopard上使用Chrome。

解决方案

img 标记,通过设置 hidefocus 属性和大纲 css属性就像这样:



HTML

 < img class =mapsrc =...usemap =...hidefocus =true/> 

CSS

  img.map,地图区域{
outline:none;
}

这应该是跨浏览器的工作!



编辑

像Sergey K评论的那样,如果您不想支持IE6,只需使用一个属性选择器。

  img [usemap],地图区域{
outline:none;
}

支持从IE7开始。


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

I'm using Chrome on Snow Leopard.

解决方案

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.

这篇关于删除图像地图区域的轮廓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆