HTML
<a class="topofpage" href="#top">TOP OF PAGE</a>
CSS
.topofpage{
color: #C00;
text-decoration: none;
}
.topofpage a:hover{
color: #FCO;
text-decoration: none;
}
マウスオーバー時の色が #FCO に変更されない
ホバー イベントで CSS のアンカー要素を削除します。
.topofpage:hover{
color: #FC0;
text-decoration: none;
}
Your CSS targets a link that is inside an element with the class topofpage. Put the selectors together to target a link that has the class:
a.topofpage:hover {
color: #FC0;
text-decoration: none;
}
Also, as Pavlo spotted, you are using #FCO instead of #FC0 for the color.
あなたの問題は、ゼロと文字「O」の間の単純な混乱です。
あなたの色は として指定されてい#FCOます。である必要があります#FC0。
文字「O」は、CSS カラーでは有効な数字ではありません。これが、あなたのスタイルが機能しない理由です。ホバリングされているかどうかとは関係ありません。単純なタイプミスです。
それがあなたのためにそれを解決することを願っています。:-)