【问题标题】:Glyphicon icon not appear on first page and after refresh pageGlyphicon 图标不会出现在第一页和刷新页面后
【发布时间】:2016-05-27 12:41:29
【问题描述】:

我在 bootstrap v3.3.5 上使用 bootstrap.min.css。我从http://getbootstrap.com 下载引导程序并在本地使用它。我注意到在 IE 9 及更高版本上运行时,字形图标存在问题。登录后第一个页面上的字形图标会消失,当我们在页面上刷新(F5)时会再次消失。

<link href="<%=request.getContextPath()%>/assets/bootstrap3/css/bootstrap.min.css" rel="stylesheet">

当我从 CDN 切换到使用 bootstrap.min.css 时,我没有遇到错误。

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">

请帮忙。不知道本地和网上的bootstrap.min.css有什么区别

谢谢。

【问题讨论】:

  • 尝试检查刷新 request.getContextPath() 的值
  • 我在刷新前后检查request.getContextPath()的值,是一样的。

标签: javascript jquery html css twitter-bootstrap


【解决方案1】:

希望对你有帮助……

    <!DOCTYPE html>
    <html lang="en">
    <head>
         <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
          <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
          <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>

    </head>
    <body>

<div class="container">
  <h2>Glyphicon Examples</h2>
  <p>Envelope icon: <span class="glyphicon glyphicon-envelope"></span></p>    
</div>

</body>
</html>

【讨论】:

  • 我想使用本地的 bootstrap.min.css。我已经自定义了其中的一些代码。
  • 会变成这样 ?
  • 如果您使用的是 Visual Studio,只需将文件拖到标题部分即可,这将适用于您
  • 我正在使用日食 Helios。我已经正确设置了文件路径,但它仍然会发生。
猜你喜欢
  • 2011-10-22
  • 1970-01-01
  • 1970-01-01
  • 2012-11-05
  • 1970-01-01
  • 2021-02-02
  • 1970-01-01
  • 2014-06-19
  • 2021-11-03
相关资源
最近更新 更多