【问题标题】:How to get rid of the blue box which appears on-click around the element clicked in mobile view?如何摆脱在移动视图中单击的元素周围单击时出现的蓝色框?
【发布时间】:2021-05-14 10:27:37
【问题描述】:

enter image description here

此蓝色框仅在移动视图中显示。我尝试设置:focus{outline:none;} 和:active{outline:none;}。还尝试使用 -webkit-tap-highlight-color: transparent;。但它不起作用。

【问题讨论】:

    标签: css highlight box


    【解决方案1】:

    这似乎是 Chrome 特有的功能。当我尝试从 previous question 添加以下 CSS 时,它似乎解决了这个问题:

    .gooey-selected {
      -webkit-tap-highlight-color: transparent;
    }
    

    【讨论】:

    • 我使用的是 -webkit-tap-highlight-color: transparent;在错误的选择器上。感谢您的帮助。
    【解决方案2】:

    你能分享一下代码吗?您需要执行 -webkit-tap-highlight-color: transparent; 但是,可能是您为该元素拥有的选择器不正确

    【讨论】:

    • 我使用的是 -webkit-tap-highlight-color: transparent;如您所说,在错误的选择器上。傻我。感谢您的帮助。
    猜你喜欢
    • 1970-01-01
    • 2021-05-01
    • 2011-11-30
    • 2014-03-10
    • 2020-12-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-03
    相关资源
    最近更新 更多