CSS焦点按钮保持边框

时间:2020-09-29 03:01:12

标签: html css

我有这个:

.some-button: focus {
    background-color: red;
    border: none;
}

但是,当我单击它时,它确实变成红色,但是仍然有可见的边框。我缺少一些正在应用边框的东西吗?

3 个答案:

答案 0 :(得分:2)

您只需要删除Set AvailableLinks = IE.Document.getelementbyid("messageMessageTypeId") For i =1 To MsgT.options.Length If MSgT.options(i).Text = "option I want it to select" Then MsgT.selectedindex=i Exit For End if Next i 之前的空格并添加focus

outline: none
.some-button:focus {
    background-color: red;
    border: none;
    outline: none;
}

答案 1 :(得分:1)

也许,这就是您想要的:

 <field name="newfield" type="string" indexed="true" stored="true" required="true"/>

答案 2 :(得分:1)

聚焦元素时,outline样式是全局设置的,因此您也需要更新outline的值。 并删除focus之前的空格。

.some-button:focus {
  background-color: red;
  border: none;
  outline: none;
}