代码之家  ›  专栏  ›  技术社区  ›  GorillaApe

如何去掉可怕的矩形标签

  •  1
  • GorillaApe  · 技术社区  · 15 年前

    stackoverflow有这个问题,正如我所见。。。 http://inath.gr/ 例如,这个站点位于顶部菜单,尽管它有 <a> 标签当以某种方式选择时,它周围没有矩形。。

    2 回复  |  直到 15 年前
        1
  •  7
  •   M2tM    15 年前

    CSS outline property :

    <style type = "text/css">
        a {outline:0;} /*this is that dotted line you get when you select an image, I believe you're talking about the outline*/
        a img {border:0;} /*Images in links default to having a blue border, so this could be the source of another annoying rectangle*/
    </style>
    
        2
  •  2
  •   Lime    15 年前

    以下内容被认为是更好的,因为它允许用户仍然通过键盘导航。

    以下链接解释了原因: http://people.opera.com/patrickl/experiments/keyboard/test

    a:hover, a:active { outline: none; }