2012-04-25 2 views
8

これは私のナビゲーション内のリンクのいずれかです。私も、私のCSSに以下の持っている青と紫のデフォルトのリンクは、どのように削除するには?

<li><a href="#live-now" class="navBtn"><span id="navLiveNow" class="white innerShadow textShadow">Live Now</span></a></li> 

a { text-decoration: none; } 
a:visited { text-decoration: none; } 
a:hover { text-decoration: none; } 
a:focus { text-decoration: none; } 
a:hover, a:active { text-decoration: none; } 

しかし、リンクがまだ紫/ひどい青色で表示されるには、ホバーのhtml /訪問しましたデフォルト。何が間違っているのですか?

a { color:red } /* Globally */ 

/* Each state */ 

a:visited { text-decoration: none; color:red; } 
a:hover { text-decoration: none; color:blue; } 
a:focus { text-decoration: none; color:yellow; } 
a:hover, a:active { text-decoration: none; color:black } 

答えて

16

あなたは色を上書きする必要があります色を定義するよりも、独自の色のアンカーを表示したい

a { text-decoration: none; color:red; } 
a:visited { text-decoration: none; } 
a:hover { text-decoration: none; } 
a:focus { text-decoration: none; } 
a:hover, a:active { text-decoration: none; } 

はデモを参照してください: - - ::あなたは自分に行く....事はCSSで訪問http://jsfiddle.net/zSWbD/7/

0

はちょっととしてあなたのように色#000を定義し、この

.navBtn { text-decoration: none; color:#000; } 
.navBtn:visited { text-decoration: none; color:#000; } 
.navBtn:hover { text-decoration: none; color:#000; } 
.navBtn:focus { text-decoration: none; color:#000; } 
.navBtn:hover, .navBtn:active { text-decoration: none; color:#000; } 

など、あなたのCSSを変更したり、この

li a { text-decoration: none; color:#000; } 
li a:visited { text-decoration: none; color:#000; } 
li a:hover { text-decoration: none; color:#000; } 
li a:focus { text-decoration: none; color:#000; } 
li a:hover, .navBtn:active { text-decoration: none; color:#000; } 
0

の場合:

1

REMOVEのデフォルトのリンクは を解決して、このようなCSSでアンカータグのプロパティHTMLと簡単な

<のhrefを追加= "" スタイル= "テキスト装飾:なし"> </a>

...これは、htmlページの使用方法は、

関連する問題