【问题标题】:How to disable the grey mask when tap on a <a> element? [duplicate]点击 <an> 元素时如何禁用灰色蒙版? [复制]
【发布时间】:2019-08-09 08:31:30
【问题描述】:

我正在尝试制作一个混合应用程序。在一个网页中,有很多按钮写成这样的

<a href="#">
    <div style = "height: 50px; width: 50px; background-color: #00ff00; margin: 32px"></div>
</a>

当我点击这些按钮并按住拇指时,按钮顶部会出现一个灰色蒙版。如何禁用此功能。

测试设备:iPhone X,真机和模拟器

【问题讨论】:

  • 请分享正确的例子
  • 你用什么设备测试这个?

标签: html css progressive-web-apps hybrid


【解决方案1】:

似乎与&lt;a href="#"&gt; 有关。删除 href 解决了这个问题。我只需要找到preventDefault的方法。

【讨论】:

  • 这应该是对您原始帖子的编辑,因为您说它不能解决问题。
猜你喜欢
  • 2015-01-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-11-25
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-02-20
相关资源
最近更新 更多