【问题标题】:Remove blue border appearing around element when clicked单击时删除元素周围出现的蓝色边框
【发布时间】:2016-08-09 00:58:13
【问题描述】:

我在 Mac OS 上使用 Firefox。当我 CMND+CLICK 表中的文本时,TD 周围会出现一个蓝色边框。我能否告诉 CSS 在单击/聚焦时不显示此边框?

<table>
  <tr>
    <td>Hello World!</td>
  </tr>
</table>

【问题讨论】:

标签: html css


【解决方案1】:

您可能会遇到outline。试试这个:

td { outline: none; }  /* value "0" also works */

https://developer.mozilla.org/en-US/docs/Web/CSS/outline

【讨论】:

    【解决方案2】:

    在你的 CSS 中放

    table {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    

    【讨论】:

      猜你喜欢
      • 2018-04-03
      • 1970-01-01
      • 2020-12-15
      • 1970-01-01
      • 2017-07-14
      • 2021-05-14
      • 2017-03-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多