如何制作bootstrap glyphicon圆形?

时间:2016-10-26 20:09:52

标签: html css twitter-bootstrap

我想制作bootstrap glyphicon圆形我将边框半径添加到类glyhphicon-menu但是我没有看到任何发生的事情,任何想法如何使用bootstrap或css实现它?

main.html中

<span  type="button" class="glyphicon glyphicon-th-list glyhphicon-menu" ng-click="isCollapsed = !isCollapsed" id="treelist"></span>

main.css

.glyphicon.glyhphicon-menu {
  font-size: 30px;
  border-radius: 50%;
}

1 个答案:

答案 0 :(得分:0)

您只需添加overflow:hidden即可剪切超出边框的文字。

.glyphicon.glyhphicon-menu {
  font-size: 30px;
  border-radius: 50%;
  overflow:hidden;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>

<span  type="button" class="glyphicon glyphicon-th-list glyhphicon-menu" ng-click="isCollapsed = !isCollapsed" id="treelist"></span>