【问题标题】:In Opera, input are enclosed in black在 Opera 中,输入被黑色包围
【发布时间】:2012-10-22 13:48:13
【问题描述】:

浏览器: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;
}

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

向前看,按钮有一个边框,因此,如果我们应用边框:none - 消失,黑色轮廓和按钮的边框

附:由谷歌翻译翻译

UPD:

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

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

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

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

【问题讨论】:

  • 边框表示该按钮是提交按钮,当用户在除按钮之外的任何表单输入上按ENTER键时将自动按下。为避免出现边框,请使用普通按钮和脚本来模拟提交按钮的功能。

标签: html input border opera


【解决方案1】:

尝试添加:

* {
border: 0px;
}

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

【讨论】:

  • 感谢您的回复。没有帮助。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2023-01-13
  • 1970-01-01
  • 2017-12-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多