在我的網站的頁腳http://www.stefaanoyen.be(左欄)我有一些社交媒體圖標,它們是圖標字體。懸停時,我想讓圈子變成紅色,其中的圖標變成白色。紅圈工作,但他們後面有一個白色的方形。如何將白色限制爲圖標/圓圈的形狀?懸停時的圖標字體背景
這是我的HTLM:
<p class="share"><a href="#">l</a> <a href="#">i</a> <a href="#">g</a> <a href="#">f</a></p>
這是我的CSS:
.share a {
color: #ececec;
text-decoration: none;
font: 50px 'socialicoregular', Helvetica, sans-serif;
}
.share:hover {
cursor: pointer;
}
.share a:hover {
color: #B61618;
text-decoration: none;
font: 50px 'socialicoregular', Helvetica, sans-serif;
background-color: #fff;
}
非常感謝您的幫助!
Stefaan
..of當然,這不會在不支持邊界半徑的瀏覽器工作:http://caniuse.com/#feat=border-radius – isotrope 2013-03-27 14:03:44
或者,你可以使用'邊界半徑:50 %':) – Terry 2013-03-27 14:07:18
更好。謝謝,@Terry – isotrope 2013-03-27 14:10:09