我目前正在制作网站并添加菜单按钮。我的问题是,当我点击一个按钮时,它周围有一个蓝色的盒子。我试着去
<button type="button" style="border:none; border-style:none"></button>
<li style="border:none; border-style:none"></li>
<a style="border:none; border-style:none" href="#">Home</a>
他们都不能工作。我的代码目前是..
<button type="button"><li><a href="music.html">Music</a></li></button>
我已经尝试了所有的border = none并尝试使用border-style和border-color。任何帮助将非常感激。
答案 0 :(得分:2)
尝试以下CSS样式,
button
{
outline: 0 none;
}
答案 1 :(得分:2)
Css outline属性可能不会一直有效。 这是一个快速的解决方案;
* {
outline: none;
}
button::-moz-focus-inner,
input[type="reset"]::-moz-focus-inner,
input[type="button"]::-moz-focus-inner,
input[type="submit"]::-moz-focus-inner,
input[type="file"] > input[type="button"]::-moz-focus-inner {
border: none;
}