我有一系列使用圖標字體和css content:
屬性呈現的社交圖標。製作社交圖標時使用僞元素內容在懸停時更改顏色
.icon-google-plus:before {
content: "\e003";
}
在僞前元素中顯示谷歌加號圖標。
如何在懸停時將此圖標更改爲顏色?我想,錯那將是類似這樣的東西...
.icon-google-plus:before a:hover {
colour: @google_plus_red;
}
我標記的要求
<a class="share_styx icon-google-plus" target="_blank" href="https://plus.google.com/share?url={{url absolute="true"}}">
<span class="hidethis_styx">
Google+
</span>
</a>
請包括您的HTML標記,您的選擇器的順序是錯誤的,應該看起來更像'a:hover .icon-google-plus:之前' –
我試過了。沒有運氣! – Luke