【发布时间】:2017-12-16 10:06:00
【问题描述】:
我尝试删除点击按钮前出现的蓝色框,如下所示:
在问之前,我做了很多研究,我尝试了以下主题给出的解决方案:
- How to remove focus border (outline) around text/input boxes? (Chrome)
- Remove blue box around buttons. HTML
- How to remove the blue box shadow border in button if clicked
- How do I remove blue "selected" outline on buttons?
- How do I remove blue "selected" outline on buttons?
- Remove blue border from css custom-styled button in Chrome
- How to remove focus around buttons on click
我已经尝试了所有的答案!它可以在计算机上运行,但不能在移动设备上运行。
如果您使用的是计算机,您可以尝试通过检查器模拟移动设备。这是按钮:https://jsfiddle.net/t4ykshst/
#add {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
outline: none;
cursor: pointer;
padding: 10px;
overflow: hidden;
border: none;
-webkit-border-radius: 50%;
border-radius: 50%;
color: rgba(255, 255, 255, 0.9);
text-align: center;
background: #1abc9c;
-webkit-box-shadow: 0 4px 3px 2px rgba(0, 0, 0, 0.2);
box-shadow: 0 4px 3px 2px rgba(0, 0, 0, 0.2);
}
#add:active {
opacity: 0.85;
-webkit-box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 0.2);
box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 0.2);
}
<input type="button" id="add" value="+" title="" style="position: absolute; left: 0px; top: 0px; width: 52px; height: 52px;" />
【问题讨论】:
-
你的例子对我来说很好。