2014-03-30 42 views
0

我目前正在製作一個網站並添加菜單按鈕。我的問題是,當我點擊一個按鈕時,它周圍有一個藍色框。我試圖在刪除按鈕周圍的藍色框。 HTML

<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並嘗試0與邊框樣式和邊框顏色。任何幫助將非常感激。

+0

您使用的是Firefox嗎? – Sophisticake

回答

2

嘗試下面的CSS樣式,

button 
{ 
    outline: 0 none; 
} 
+0

不會概述:無;工作也一樣?這就是我多年來所做的。 – Sophisticake

+0

工作完美。謝謝! – Rguarascia

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; 
}