我想使用a:current屬性來改變元素的樣式 。但問題是,一個href不能被 指向另一個頁面。 所以我創造了這樣的東西。CSS a:當前特徵
<a class='linkstyl' href="#1" >A</a>
<a class='linkstyl' href="#2" >B</a>
<a class='linkstyl' href="#3" >C</a>
我的CSS文件是這樣
.linkstyl{
cursor:hand;cursor:pointer;text-decoration:none;
color: #ccc;
}
.linkstyl:current{
cursor:hand;cursor:pointer;text-decoration:none;
color: #aaa;
}
但目前功能不作爲的思想工作,如何糾正呢?
快速的谷歌搜索不會引用任何對':current'的引用。您是否在使用某個庫來啓用此功能,或者我的google-fu功能很弱? – JJJ
我不熟悉':current'。它與':hover'和':active'有什麼不同? –
你的意思是[':target'](http://www.w3.org/TR/css3-selectors/#target-pseudo)? –