【问题标题】:Search icon does not show magnifying glass in Internet ExplorerInternet Explorer 中的搜索图标不显示放大镜
【发布时间】:2014-01-07 19:12:36
【问题描述】:

我网站的搜索图标(顶部菜单最右侧的绿色方块)在 Internet Explorer 中没有显示放大镜,但在 FireFox 和 Chrome 等其他浏览器中却显示。

查看以下链接:

www.robvanderstaaij.nl

非常欢迎任何解决此问题的建议。

【问题讨论】:

  • 你能描述得更详细些吗?比如版本、操作系统等?
  • Internet Explorer 是哪个版本?我认为您使用的旧版本无法处理 :after
  • 所有版本的 Internet Explorer 都存在该问题。

标签: html css


【解决方案1】:

将此代码添加到您的 </body> 标记之前。

   <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->
</body>

或者你可能错过了:

 <link rel="stylesheet" media="all" href="assets/css/your-icons.css" />
 <!--[if IE 7]>
   <link rel="stylesheet" media="all" href="assets/css/your-icons-ie7.min.css" />
 <![endif]-->

【讨论】:

    【解决方案2】:

    这是生成字体的 CSS 代码:

    @font-face {
        font-family: 'Genericons';
        src: url('font/genericons-regular-webfont.eot');
    }
    
    @font-face {
        font-family: 'Genericons';
        src: url(data:application/font-woff;charset=utf-8;base64,--REDACTED--) format('woff'),
             url('font/genericons-regular-webfont.ttf') format('truetype'),
             url('font/genericons-regular-webfont.svg#genericonsregular') format('svg');
        font-weight: normal;
        font-style: normal;
    }
    

    IE8 及更早版本仅支持 EOT,但未定义该字体。第二个@font-face 完全覆盖第一个。

    尝试将.eot src 属性移动到真正长的之前,并删除第一个@font-face 块。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-07
      • 2013-03-20
      • 1970-01-01
      • 2011-01-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多