【发布时间】:2019-11-05 14:52:55
【问题描述】:
我需要但不能删除焦点按钮文本周围的白色虚线边框。
在阅读了有关“删除白色边框(尤其是Dotted border around link? 和内部链接)的文章后,我尝试了几种禁用轮廓的解决方案,例如"outline: 0; 或outline: none;,使用或不使用!important。
但没有什么能移除焦点按钮文本周围的白色虚线边框。 这是我最简单的测试页代码。我无法显示屏幕截图,因为它会移除按钮的焦点。
button {
font-size: 87.5%;
font-family: "ubuntu", Sans-serif;
padding: 0 16px;
min-width: 64px;
height: 36px;
cursor: pointer;
background-color: royalblue;
color: white;
border: 0;
}
button:focus,
button:active {
outline: none;
outline: 0;
outline: none !important;
outline: 0 !important;
}
<button type="button">TEST</button>
在 Ubuntu 18.04 (Bionic Beaver) 上使用 Firefox 67.0.3,此页面仍然在焦点按钮文本周围显示虚线白色边框,我想删除它(我将使用我自己的方法显示焦点) .
【问题讨论】: