グローバル リンク スタイルをオーバーライドしたい div があります。グローバルと特定の 2 つのリンク スタイルがあります。ここにコード:
A:link {text-decoration: none; color: #FF0000;}
A:visited {text-decoration: none; color: #FF0000;}
A:hover {text-decoration: none; color: #FF0000;}
A:active {text-decoration: none; color: #FF0000;}
#macrosectiontext
{
position:relative;
font:Arial, sans-serif;
text-align:center;
font-size:50px;
font-style: bold;
margin-top:245px;
opacity: 0.6;
background-color:transparent;
}
#macrosectiontext A:link {text-decoration: none; color: #000000;}
#macrosectiontext A:visited {text-decoration: none; color: #FFFFFF;}
#macrosectiontext A:hover {text-decoration: none; color: #FFFFFF;}
#macrosectiontext A:active {text-decoration: none; color: #FFFFFF;}
そして、私は次のようにdivを使用します:
<div id="macrosectiontext"><a href="www.google.it">bla bla bla</a></div>
しかし、うまくいかないようです。div は引き続きグローバル リンク スタイルを継承します。