【问题标题】:Bootstrap glyphicons not shown in IE and SafariIE 和 Safari 中未显示引导字形图标
【发布时间】:2017-01-29 19:27:14
【问题描述】:

我的 ASP.NET MVC 应用程序有一个奇怪的问题:引导字形图标未在 IE 和 Safari 中显示,但在 Google Chrome 和 FireFox 中成功显示。

我检查了在较少的文件中,我有正确的字体文件路径(.eot 和其他)。但它在 IE 和 Safari 中不起作用。 当在浏览器检查器中查看 html 和 css 时,我看到 glyphicon 的类具有被触发的属性内容,但在 Chrome 中它没有被触发。 我还在 IE 设置中启用了允许字体加载,但它没有帮助。 我正在使用 Bootstrap 3.3.6。

我在 IE 11、Edge 和 Safari 中遇到了这个问题。

请告诉我如何解决?

更新。

            <p class="input-group">
                <input name="startDate" type="text" uib-datepicker-popup="{{format}}" ng-model="startDate" is-open="status.startDateOpened" datepicker-options="dateOptions" close-text="Close" />
                <span class="input-group-btn">
                    <button type="button" class="btn btn-default" ng-click="openStartDate($event)"><i class="glyphicon glyphicon-calendar"></i></button>
                </span>
            </p>

【问题讨论】:

  • 谢谢你,Vikrant,但描述了 IE8 的方法,我在 IE 11、Edge 和 Safari 中遇到了这个问题。
  • 代码代码代码代码代码代码代码
  • dippas,我已经添加了代码,请看第一条消息。

标签: html css twitter-bootstrap internet-explorer safari


【解决方案1】:

经过一些StackOverflow搜索,似乎之前遇到过这个问题。问题可能与字体的 HTTP 标头 Cache-Control: no-cache 有关。虽然这适用于 HTTP,但通过 HTTPS 会导致 Internet Explorer 忽略下载的字体。

我最好的猜测是它是这种行为的一种变体:http://support.microsoft.com/kb/815313

因此,如果您在 Developer Tools 网络视图中看到 IE 通过每种字体工作,则可能值得检查您是否有 Cache-Control 标头并将其删除。

引用另一个案例:Bootstrap (v3.3.4) glyphicons not displayed in IE when refresh page (F5)

另一个,我找到的原始可能的解决方案:@font-face EOT not loading over HTTPS

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-06-10
    • 1970-01-01
    • 2017-06-23
    • 1970-01-01
    • 2014-10-06
    • 1970-01-01
    • 2013-10-02
    相关资源
    最近更新 更多