0
我一直在搜索和閱讀關於CSS優先順序,我想我有正確的代碼,但它不起作用。 我想要所有的鏈接都是藍色的,除了那些class ='green'的鏈接。 CSS代碼是:CSS鏈接優先
a.green :link{
color: green;
text-decoration: none;
}
a.green :visited{
color: green;
text-decoration: none;
}
a:link {
color: blue;
text-decoration: none;
}
a:visited {
color: blue;
text-decoration: none;
}
a:hover {
color: orange;
font-style: italic;
}
但結果是所有鏈接都以藍色繼續。 任何幫助將受到歡迎。
您需要使用類或ID的鏈接,以便他們可以識別。如'class =「className」'或'id =「idName」' – Sir
@Dave:那不是他已經在做什麼? – BoltClock
@BoltClock不在html中我懷疑 – Sir