【问题标题】:IE Showing black border outline on submit buttonIE 在提交按钮上显示黑色边框轮廓
【发布时间】:2013-06-19 03:30:40
【问题描述】:

我试图了解为什么 IE 7>10 在提交按钮上显示黑色边框。为了清除它,我必须在字段集中单击,然后它就会消失。但是当我点击发送或取消时回来。这是 IE 的常见问题吗?我已经包括截图。谢谢!

css代码

.submit
        {

        margin:-50px 0 0 -148px;
        background-color:#eee;
        height:40px;
        width:120px;
        padding:0;
        border:1px solid #666;
        color:#42A0FF;

        }

.cancel
        {

        margin: -51px 0 0 -20px;
        background-color:#eee;
        height:40px;
        width:120px;
        padding:0;
        border:1px solid #666;
        color:#42A0FF;

        }

fieldset
        {

        background:#f2f2e6;
        border-color:#cccccc #cccccc #cccccc #cccccc;
        margin:10px 0 46px -150px;
        width:404px;
        display:block;
        text-height:10px;
        padding-bottom:15px;
        }

【问题讨论】:

  • 你的html好吗?没有那个谁能帮忙?
  • 这可能只是浏览器默认样式(所有浏览器都有)。您是否在带有边框的按钮/元素上尝试了border: none; CSS 规则?
  • 可能是 IE 的辅助功能,用于指示当用户通过 enter 键提交表单时哪个按钮将被视为按下

标签: css internet-explorer


【解决方案1】:

尝试重置主输入

 input {border:0; margin:0;padding:0;}

并添加一个跨度来为跨度提供您想要的边框,以便它可以通用:

.input-shell {border: #ccc 1px solid}

<span class="input-shell"><input button /></span>....

这是一个 JSFIDDLE:

http://jsfiddle.net/Riskbreaker/tqnhg/1/

这是同一件事的参考:

Any way to remove IEs black border around submit button in active forms?

最后这样做:

  input[type=submit],
    input[type=reset],
    input[type=button]
    {
        filter:chroma(color=#000000);
        color:#cccccc;
    }

【讨论】:

    猜你喜欢
    • 2021-07-16
    • 2019-04-19
    • 1970-01-01
    • 2014-06-13
    • 1970-01-01
    • 2016-11-18
    • 2013-04-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多