简体   繁体   English

-webkit-tap-highlight-color未应用于区域标记

[英]-webkit-tap-highlight-color not applied to area tag

Ok, I know this has been asked many times, but my situation is a bit different: 好的,我知道这已被问过很多次,但我的情况有点不同:

I have an image map and I don't want Android/iPhone to display the green border (gray overlay on iPhone) when an AREA on the image is tapped. 我有一个图像地图,当我点击图像上的区域时,我不希望Android / iPhone显示绿色边框(iPhone上的灰色叠加)。

I have tried -webkit-tap-highlight-color: rgba(0,0,0,0) and it seems to work for an <a> link but not an <area> . 我试过-webkit-tap-highlight-color: rgba(0,0,0,0) ,它似乎适用于<a>链接但不适用于<area> I guess the problem is that in fact no CSS can be applied to <area> ? 我想问题是,实际上没有CSS可以应用于<area>

Can this somehow be circumvented? 这可以以某种方式被规避吗? I don't want the user to see the green border when he taps on an area. 我不希望用户在点击某个区域时看到绿色边框。

Unfortunately, browsers doesn't allow to set(and run) css properties to area tags. 不幸的是,浏览器不允许将css属性设置(和运行)到区域标记。

I use maphilight plugin to do that in jquery, it works like a charm : http://davidlynch.org/projects/maphilight/docs/ 我使用maphilight插件在jquery中执行此操作,它就像一个魅力: http ://davidlynch.org/projects/maphilight/docs/

Example, here : http://davidlynch.org/projects/maphilight/docs/demo_usa.html 例如,这里: http//davidlynch.org/projects/maphilight/docs/demo_usa.html

Then, I guess that you could set transparent border with : stroke: false 然后,我猜你可以设置透明边框: stroke: false

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM