【问题标题】:Disable link on mobile device在移动设备上禁用链接
【发布时间】:2017-06-20 20:30:45
【问题描述】:

我有一个由内容视图插件填充的页面。内容是特定类别的博客文章。我禁用了链接,因此人们只能看到该页面上的内容,而无法单击缩略图转到帖子页面。我用 CSS 禁用了点击,但是,在移动设备上这不起作用。例如,如果我触摸缩略图,它仍然会将我带到帖子页面。不确定我是否有道理;这是供参考的页面:

http://studio.usualhabitat.com/portfolio/

这是我正在使用的:

body.page-id-686 img.pt-cv-thumbnail {touch-action: none!important; pointer-events: none!important; cursor: default!important;}
body.page-id-686 .pt-cv-ifield a._self {touch-action: none!important; pointer-events: none!important; cursor: default!important;}

【问题讨论】:

  • 在此处发布您的代码,以便我们提供帮助。
  • 我编辑了帖子:)

标签: javascript css wordpress


【解决方案1】:

你可以使用 touch-action: none;

问候。

【讨论】:

    猜你喜欢
    • 2019-04-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-03-27
    • 2014-07-24
    • 2017-09-27
    • 2016-12-02
    相关资源
    最近更新 更多