html - Bootstrap 字形图标未在 IE 和 Safari 中显示

标签 html css twitter-bootstrap internet-explorer safari

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

我检查过在 less 文件中我有正确的字体文件路径(.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>

最佳答案

经过StackOverflow的一番搜索,好像以前也遇到过这个问题。问题可能与 HTTP header Cache-Control: no-cache 字体有关。虽然这适用于 HTTP,但在 HTTPS 上它会导致 Internet Explorer 忽略下载的字体。

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

因此,如果您看到 IE 在开发人员工具 WebView 中处理每种字体,则可能值得检查您是否有 Cache-Control header 并将其删除。

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

还有一个,我找到的最初可能的解决方案:@font-face EOT not loading over HTTPS

关于html - Bootstrap 字形图标未在 IE 和 Safari 中显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39618358/

相关文章:

html - 如何使用严格的 HTML/CSS 在点击时显示/隐藏 div

css - IE 11 中父子之间的幽灵边距/填充

javascript - 在 Angular 状态更改后激活特定选项卡

html - 在 Bootstrap 列表中垂直居中文本

html - 当宽度基于百分比动态变化时制作一个 <div> 正方形

html - 在全宽元素之前添加一个固定宽度的伪元素

html - 全宽图像上的相对定位

android - :active not working on phonegap

html - Bootstrap css 与我的代码不兼容

html - 如何更改 Bootstrap 媒体查询?