我有一个菜单组成的字体真棒图标和文本。当用户访问手机上的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