【问题标题】:Remove element highlight on tap in Firefox for Android在 Firefox for Android 中删除元素突出显示
【发布时间】:2013-11-19 11:42:21
【问题描述】:

点击按钮后,其背景颜色会在短时间内变为半透明灰色。我想禁用此行为或自己设置颜色。

如果我没有设置背景颜色和图像,我不会太在意它:当颜色改变时,图像保持不变并且看起来很丑。

我试过 :active、:hover、:active:hover,但没有成功。 -webkit-tap-highlight-color 不适用于此处,因为它不是 Webkit 浏览器(但我已经尝试过......)。 这不是虚线轮廓的问题,我已经能够将其删除。

这里有一些代码供参考:

<style>
  #that_button {
    background: url(https://www.google.com/images/srpr/logo11w.png) 130px .3em no-repeat;
    background-size: auto 1.5em;
    background-color: #66ccff;
    border: none;
    height: 2em;
    width: 200px;
  }
</style>
<button id="that_button">Hello</button>

【问题讨论】:

  • 你有代码给我们看看吗?
  • 我添加了一个示例代码。
  • 您在 Android 设备上的哪个浏览器上进行测试?

标签: android css firefox


【解决方案1】:

高亮样式定义在那里:https://hg.mozilla.org/mozilla-central/file/f003c386c77a/mobile/android/themes/core/content.css#l309,它不能被覆盖。唯一的“解决方案”是使用 div 或其他与源中的选择器不匹配的元素,因为它们不会被突出显示(尽管这不会是语义 html)。

我已经能够联系开发人员,结果如下:https://bugzilla.mozilla.org/show_bug.cgi?id=936593,因此应该修复该行为。很抱歉在我找到答案后延迟提供答案。

【讨论】:

  • 从 Mozilla 方面来看这是什么状态?我们可以改变它吗?
猜你喜欢
  • 2023-02-08
  • 2016-08-20
  • 1970-01-01
  • 2011-08-31
  • 2014-01-02
  • 2020-02-14
  • 2012-09-12
  • 2015-07-26
  • 2020-11-12
相关资源
最近更新 更多