浏览器:Opera 12
在浏览器 Opera 中,如果该 block 包含至少 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;
}
请告诉我,如何解决这个问题?
向前看,按钮有边框,因此,如果我们应用边框:无 - 消失,黑色轮廓和按钮边框
附言由谷歌翻译翻译
更新:
如果在 CSS 开头指定问题消失:
noindex:-o-prefocus, input[type="submit"] {
border: none;
}
noindex:-o-prefocus, input[type="submit"]:hover {
border: none;
}
但是,这种解决方案完全去除了边框,这是不可取的
最佳答案
尝试添加:
* {
border: 0px;
}
在 css 文件的最开始。这可以防止浏览器放置他的默认边框
关于html - 在 Opera 中,输入用黑色包围,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13012831/