【问题标题】:How to remove border / outline from focused radio input in Firefox on Linux如何在 Linux 上的 Firefox 中从焦点无线电输入中删除边框/轮廓
【发布时间】:2012-10-11 11:19:59
【问题描述】:

我知道关于 SO 的类似问题有很多答案,但似乎没有一个对我有用。问题在于,仅在 Linux 上的 Firefox 中(Windows 很好)无线电输入在聚焦时具有橙色轮廓。当输入被放置在带有overflow: hidden 的元素内时,这个轮廓是错误的:

<div style="width: 100px; margin: 30px auto; overflow: hidden;">
    <label><input type="radio" name="some_radio">radio 1</label>
    <br>
    <label><input type="radio" name="some_radio">radio 2</label>
</div>

那么我怎样才能摆脱那个大纲,有人可以帮忙吗?我试过input::-moz-focus-inner::-moz-focusring 等,但没有任何效果。

这里是jsFiddle,但只有使用 Linux 才能看到问题。

【问题讨论】:

  • 你试过看看这个吗? w3schools.com/cssref/pr_outline.asp我手头没有Linux,所以我不能轻易测试...
  • @IvanLYes,我尝试在此输入上设置 outlineborder,但没有任何帮助。
  • 好吧,试试 -moz-appearance: none 怎么样?很抱歉在无法验证的情况下产生想法。
  • @IvanL 使收音机变得丑陋,它删除了轮廓,但所有其他样式也被删除了,有没有办法只删除轮廓?
  • 恐怕你会遇到这个问题:bugzilla.mozilla.org/show_bug.cgi?id=605985

标签: css firefox radio-button outline


【解决方案1】:

这是由您的 GTK 主题绘制的。

您可以通过 -moz-appearance: none 完全关闭 GTK 主题的使用,但您不能选择要使用的主题部分:主题基础架构实际上不允许这样做。

【讨论】:

    【解决方案2】:

    除了我上面的评论,这是我在 FF 中查看时看到的内容。

    这是当我转到 SystemInfo->操作系统时操作系统告诉我的内容(以防它有所作为)

    -Version-
    Kernel      : Linux 3.2.0-23-generic (x86_64)
    Compiled        : #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012
    C Library       : Unknown
    Default C Compiler      : GNU C Compiler version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) 
    Distribution        : Linux Mint 13 Maya
    -Current Session-
    Computer Name       : enhzflep-VirtualBox
    User Name       : enhzflep (*****)
    Home Directory      : /home/enhzflep
    Desktop Environment     : MATE
    -Misc-
    Uptime      : 57 minutes
    Load Average        : 0.60, 0.52, 0.42
    

    【讨论】:

      【解决方案3】:
      input, 
      input:active,
       input:focus,
      a:focus{ outline: 0; outline-style:none; outline-width:0; }
      
      
       button::-moz-focus-inner,
       input[type="reset"]::-moz-focus-inner,
       input[type="button"]::-moz-focus-inner,
       input[type="submit"]::-moz-focus-inner,
       input[type="file"] > input[type="button"]::-moz-focus-inner,
      a
       { border: none; }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-01-11
        • 2013-11-22
        • 2011-03-24
        • 2016-03-21
        • 2013-09-18
        • 2011-04-03
        • 2013-10-27
        相关资源
        最近更新 更多