我有一個菜單組成的字體真棒圖標和文本。當用戶訪問手機上的Web應用程序時。我只想顯示帶圓圈的字體超棒圖標作爲背景,並且沒有文字。所以我創建了下面的CSS,但我似乎無法讓它工作。有小費嗎?字體真棒按鈕背後的圓形背景
<a ui-sref="index" class="sub-navigation-button" ui-sref-active="sub-navigation-button-active">
<i class="fa fa-dot-circle-o"></i>
<span>Exit</span>
</a>
.sub-navigation-button {
font-family: inherit;
font-weight: 500;
width: 30px;
height: 30px;
line-height: 30px;
border-radius: 50%;
overflow: hidden;
-webkit-backface-visibility: hidden;
background: rgba(255, 255, 255, 1);
text-transform: uppercase;
}
.sub-navigation-button-active {
font-size: 17px;
width: 30px !important;
height: 30px !important;
line-height: 30px;
border-radius: 50%;
overflow: hidden;
-webkit-backface-visibility: hidden;
color: rgba(255, 255, 255, 1) !important;
background: rgba(3, 169, 244, 1);
}
雖然有效,但它們並不以圓形爲中心。 – User183849481 2014-09-22 20:44:20