任何方式删除IE的黑色边框提交按钮在活动窗体? [英] Any way to remove IEs black border around submit button in active forms?

查看:65
本文介绍了任何方式删除IE的黑色边框提交按钮在活动窗体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在实现一个使用自定义样式的提交按钮的设计。它们只是浅灰色的按钮,有一个稍深的外边界:

I am implementing a design that uses custom styled submit-buttons. They are quite simply light grey buttons with a slightly darker outer border:

input.button {
    background: #eee;
    border: 1px solid #ccc;
}

这看起来只是在Firefox,Safari和Opera。问题是Internet Explorer,都是6和7.

This looks just right in Firefox, Safari and Opera. The problem is with Internet Explorer, both 6 and 7.

由于表单是页面上的第一个,它被计为主窗体,因此从去吧。

Since the form is the first one on the page, it's counted as the main form - and thus active from the get go. The first submit button in the active form receives a solid black border in IE, to mark it as the main action.

如果我关闭了边框,那么黑色的额外边框在IE也消失了。

If I turn off borders, then the black extra border in IE goes away too. I am looking for a way to keep my normal borders, but remove the outline.

推荐答案

这里有效:

<html>
    <head>
        <style type="text/css">
            span.button {
                background: #eee;
                border: 1px solid #ccc;
            }

            span.button input {
                background:none;
                border:0;
                margin:0;
                padding:0;
            }   
        </style>
    </head>
    <body>
        <span class="button"><input type="button" name="..." value="Button"/></span>
    </body>
</html>

这篇关于任何方式删除IE的黑色边框提交按钮在活动窗体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆