glyphicon无效

时间:2016-09-06 01:11:54

标签: asp.net twitter-bootstrap glyphicons

我的字形不适用于我的“下拉”课程。但它适用于我的“下拉菜单”课程。我的第一个标签,文本是通过数据库加载的,但是glyphicon没有显示出来。我该怎么办?

 <ul class="nav navbar-nav navbar-right">
     <li class="dropdown">         
      <a id ="lblnames" class="dropdown-toggle" data-toggle="dropdown" runat="server" style="color:white; cursor:pointer"># <span class="glyphicon glyphicon-user"></span></a>

     <ul class ="dropdown-menu">
     <li><a href="Account/Manage.aspx" style="font-family:Calibri">Manage Account <span class="glyphicon glyphicon-cog pull-right"></span></a></li>

     <li><a id="endsession1" href="Account/forLogOut.aspx" style="font-family:Calibri">Log Out <span class="glyphicon glyphicon-log-out pull-right"></span></a></li>
                            </ul>
                            </li>

                        </ul>

1 个答案:

答案 0 :(得分:2)

我尝试了你的代码,看起来很好。问题是你在内联CSS中将颜色设置为白色:

<a id ="lblnames" class="dropdown-toggle" data-toggle="dropdown" runat="server" style="color:white; cursor:pointer"># <span class="glyphicon glyphicon-user"></span></a>

我将颜色更改为其他颜色并且工作正常。 :)