2

浏览器:Opera 12

在浏览器 Opera 中,如果该块包含至少一个 2 输入,其中之一是 type = "submit",则按下普通输入字段 - type = "submit" 的输​​入参数将分配一个黑色边框。

在此处输入图像描述

type = "submit" 的输​​入代码:

<input type="submit" id="SearchBlock_BtnSearch" value="Search" class="mc-button mc-button-orange"/>

款式:

.mc-button {
background: -o-linear-gradient(to bottom, #EEEEEE, #D3D3D3) transparent;
border-bottom: 1px solid #919191;
border-left: 0px solid #919191;
border-radius: 10px;
border-right: 0px solid #919191;
border-top: 0px solid #919191;
clear: none;
color: #676767;
cursor: pointer;
float: left;
font-family: "Myriad Pro", "Arial", "Helvetica", sans-serif;
font-size: 12px;
height: 26px;
letter-spacing: 0.01px;
line-height: 26px;
min-width: 10px;
overflow: visible;
padding: 0px 24px !important;
position: relative;
text-align: center;
text-decoration: none;
text-shadow: 0px 1px #F3F3F3;
text-transform: uppercase;
}

.mc-button-orange { 
background: -o-linear-gradient(to bottom, #EEEEEE, #D3D3D3) transparent;
border-bottom: 1px solid #919191;
color: #676767;
position: relative;
text-shadow: 0px 1px #F3F3F3;
}

请告诉我,如何解决这个问题?

展望未来,按钮有一个边框,因此,如果我们应用边框:无 - 消失,黑色轮廓和按钮的边框

PS 由谷歌翻译

升级版:

如果在 CSS 开头指定问题就消失了:

noindex:-o-prefocus, input[type="submit"] {
    border: none;
}

noindex:-o-prefocus, input[type="submit"]:hover {
    border: none;
}

但是,此解决方案完全去除了边界,这是不可取的

4

1 回答 1

0

尝试添加:

* {
border: 0px;
}

在 css 文件的开头。这可以防止浏览器放置他的默认边框

于 2012-10-22T13:59:09.857 回答