我希望在应用程序的侧边栏中添加一个glyphicon-menu-left图标,这样当点击它时,侧边栏就会折叠成一个汉堡菜单图标。但是,使用我目前的代码时,图标本身(左箭头)不会出现,当单击按钮时,没有任何反应。 这是带有glyphicon按钮的html片段:
<div class="container">
<div class="row">
<!--Collapsable navbar-->
<div class="sidebar-nav">
<div class="navbar navbar-default" role="navigation">
<div class="navbar-header" >
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="visible-xs navbar-brand">Logo</span>
</div>
<div class="navbar-collapse collapse sidebar-navbar-collapse">
<button type="button" class="btn btn-default">
<span class="glyphicon glyphicon-menu-left leftarrow" aria-hidden="true"></span>
</button>
<ul class="nav navbar-nav mylist" style="align-items:center">
为什么图标本身不出现,为什么图标不能执行所需的功能? 非常感谢提前:))
答案 0 :(得分:0)
我有同样的问题,我通过将Bootstrap版本从3.3.1升级到3.3.7来修复它。 您应该在bootstrap.css文件中找到以下代码
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.6.0/Chart.js"></script>
<div ng-app="app" ng-controller="controller">
<div ng-repeat="project in Projects" ng-if="project.todoTask != 'NaN'">
<canvas height="100" width="200" doughnut-chart name="{{project.name}}" todo="{{project.todoTask}}" inprogress="{{project.inprogressTask}}" complete="{{project.completeTask}}" width="250" height="250"></canvas>
</div>
</div>