Remove tap outline from anchor element on Android device viewed with Firefox mobile

白昼怎懂夜的黑 提交于 2019-12-10 13:37:58

问题


Firefox mobile on Android tablet places a default outline around an anchor element when it recieves focus with a tap event. I can find no way to remove it ie the equivalent of

-webkit-tap-highlight-color: rgba(0, 0, 0, 0);

for Firefox.


回答1:


I don't think that this is possible through css for mozilla browsers.

http://peter.sh/experiments/vendor-prefixed-css-property-overview/

Maybe you could bind a Javascript EventListener "onfocus" to the anchor with a callback which automatically blurs the element when it is focused. It's more like a hack, but it should do the job



来源:https://stackoverflow.com/questions/9588812/remove-tap-outline-from-anchor-element-on-android-device-viewed-with-firefox-mob

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!