【问题标题】:Help removing black border on focus of input button in IE帮助删除 IE 中输入按钮焦点上的黑色边框
【发布时间】:2011-08-17 08:27:35
【问题描述】:

在 IE 7 及更低版本中,当输入按钮获得焦点时,我无法摆脱出现的黑色边框。我试过了:

input:focus {
outline-width:0;
outline:none;
border: 1px solid #FFF; 
}

在 CSS 中,但它不执行任何操作。有什么想法吗?

【问题讨论】:

    标签: html css internet-explorer


    【解决方案1】:

    您需要将边框颜色设置为透明才能在 IE 中移除边框。像这样:

    input:focus{
      border: none;
      border-color: transparent;
    }
    

    在此处了解更多信息:http://bitesizebugs.wordpress.com/2009/08/17/border-none-not-working-on-text-input-in-internet-explorer/

    【讨论】:

    • 这对我不起作用,黑色边框仍然出现在焦点上
    【解决方案2】:

    我是从这里的某个人那里看到的。 链接:https://stackoverflow.com/a/39524745/12815454

    .your_button_class:focus{
        outline=0px;
    }
    

    谢谢乔迪!

    【讨论】:

      猜你喜欢
      • 2012-01-26
      • 2021-06-04
      • 2011-02-19
      • 2012-11-05
      • 2019-02-23
      • 1970-01-01
      • 2015-07-09
      • 1970-01-01
      • 2019-11-05
      相关资源
      最近更新 更多