简体   繁体   English

在Fennec中,“webkit-tap-highlight-color”的等价物是什么?

[英]What is the equivalent of “webkit-tap-highlight-color” in Fennec?

I want to disable the orange highlighting displayed when the user taps a link. 我想禁用用户点击链接时显示的橙色突出显示。 I think iOS and Android Browsers support this by using "webkit-tap-highlight-color". 我认为iOS和Android浏览器通过使用“webkit-tap-highlight-color”来支持这一点。 Is there a way to do this? 有没有办法做到这一点?

Only document.querySelector("a, label, button") and change its tagName to other, for example span with appropriate aria value. 只有document.querySelector("a, label, button")并将其tagName更改为其他,例如span以及相应的aria值。 You also need to change your CSS. 您还需要更改CSS。

The tap color is hardcoded in fennec/firefox and it cannot be changed like "::selection"/::-moz-selection. tap字体在fennec / firefox中是硬编码的,它不能像“:: selection”/ :: - moz-selection那样改变。 Additionally ::-moz-selection is not complete, because it doesn't change image background for selected elements. 另外:: - moz-selection未完成,因为它不会更改所选元素的图像背景。

Optionally: 可选:

div.tap-detector
{
   position:fixed;
   height:100%;
   top:0rem;
   left:0rem;
   width:100%;
   z-index:1000;
   overflow:hidden;
}

and redirect all click, mousemove, mousedown and mouseup events (and other if used) from div to elements under it. 并将所有click,mousemove,mousedown和mouseup事件(以及其他如果使用的话)从div重定向到其下的元素。 Redirected click shall not use tap-highlighting. 重定向的点击不得使用点击突出显示。 Probably scroll gesture you not need to catch - elements with overflow:hidden are "transparent" for scroll gesture. 可能滚动你不需要捕捉的手势 - 溢出的元素:隐藏的是滚动手势的“透明”。

It is not clear solution and use only if YOU MUST because your boss grumbles. 目前尚不清楚解决方案,只有在你因为老板抱怨的情况下才能使用。

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

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