IE8 fbml like 按钮和eot(字体嵌入)

发布于 2024-10-20 01:36:18 字数 1380 浏览 1 评论 0原文

我对我开发的网站之一有疑问。 情况是这样的: 我使用的是在 fontsquirrel.com 上生成的 @font-face,在每个浏览器中(除了 IE8)它都工作正常。一开始它也适用于 IE8,但是(我猜)更新后它就停止正常工作了。 这就是发生的情况,加载页面后,页面上的字体保持不变,直到您将鼠标悬停在文档上,然后应用 @font-face 规则。 您可以在这里看到: http://devel.2klika.net/fiolic/demo/home .php 另外,我在该页面上使用 fbml 作为 fb:like 按钮,这是代码:

        <span style="float: right; position: relative; left: 10px;">
            <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
            <fb:like href="http://www.facebook.com/#!/pages/Mesnice-Fiolic/174173775933578" layout="button_count" show_faces="false" width="50" font="arial"></fb:like>
        </span>

我认为注释掉 fb:like 可以解决@font-face 问题,如下所示:

        <span style="float: right; position: relative; left: 10px;">
            <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
            <!-- <fb:like href="http://www.facebook.com/#!/pages/Mesnice-Fiolic/174173775933578" layout="button_count" show_faces="false" width="50" font="arial"> </fb:like> -->
        </span>

我想使用该 fb :like 按钮,如果可以使其与 IE8 和 @font-face 一起工作:)

我使用 Windows 7 64 位、IE 8.0.7601.17514 64 位和 32 位对此进行了测试 如果我在兼容性视图中使用 IE8,它可以正常工作。 有人可以帮我解决这个问题吗? 提前致谢

I have issue with one of site that I developing.
Situation is like this:
I'm using @font-face generated at fontsquirrel.com, and in every browser, except for IE8 it works fine. In the beginning it worked for IE8 too, but (I guess) after update it stops working normally.
This is what's happening, after page is loaded, font on the page stays the same until you mouse over the document, after that it applies @font-face rule.
You can see that here: http://devel.2klika.net/fiolic/demo/home.php
Also I'm using fbml on that page for fb:like button, this is the code:

        <span style="float: right; position: relative; left: 10px;">
            <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
            <fb:like href="http://www.facebook.com/#!/pages/Mesnice-Fiolic/174173775933578" layout="button_count" show_faces="false" width="50" font="arial"></fb:like>
        </span>

I figured that commenting out fb:like is solving, sort of, @font-face problem, like this:

        <span style="float: right; position: relative; left: 10px;">
            <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
            <!-- <fb:like href="http://www.facebook.com/#!/pages/Mesnice-Fiolic/174173775933578" layout="button_count" show_faces="false" width="50" font="arial"> </fb:like> -->
        </span>

I would like to use that fb:like button if it is possible to make it work with IE8 and @font-face :)

I tested this with Windows 7 64bit, IE 8.0.7601.17514 64bit and 32bit
If I'm using IE8 in compatibility view it works normally.
Does anyone can help me with this issue?
Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

陌伤浅笑 2024-10-27 01:36:18

我在其他论坛上发现了很多关于将命名空间添加到 html 标记作为实现这项工作的方法的回复。我决定自己尝试一下,非常高兴,IE8 中显示了“赞”按钮。

我将 html 标签从: 更改

<html>

为:

<html xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/">

如下面我使用的代码所示:

<html xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/">
<head>
</head>
<body>

<div><fb:like id="fb_like_btn_iframe" show_faces="no" width="220" href="http://www.pixorial.com"></fb:like></div>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
  api_key = "<%= FACEBOOK['key'] %>";
  FB.init({
    appId  : api_key,
    status : true, // check login status
    cookie : true, // enable cookies to allow the server to access the session
    xfbml  : true  // parse XFBML
  });

  var like_clicked = function(href, widget){
    $.ajax({
      type : "POST",
      url : '<%= url_for :controller => :gallery, :action => :update_likes %>',
      data : {"url_of_like": href, "type": "like", "authenticity_token": <%= form_authenticity_token.inspect %>}
    });
    parent.likeButtonChanged(href);
  }

  var like_unclicked = function(href, widget){
    $.ajax({
      type : "POST",
      url : '<%= url_for :controller => :gallery, :action => :update_likes %>',
      data : {"url_of_like": href, "type": "unlike", "authenticity_token": <%= form_authenticity_token.inspect %>}
    });
    parent.likeButtonChanged(href);
  }

  $(document).ready(function(){
    FB.Event.subscribe('edge.create', like_clicked);
    FB.Event.subscribe('edge.remove', like_unclicked);
  })
</script>

</body>
</html>

I had found a lot of responses on other forums talking about adding namespaces to the html tag as a way of making this work. I decided to try it my self and with great joy, the like button was displaying in IE8.

I changed my html tag from:

<html>

to:

<html xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/">

As seen in the code I used below:

<html xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://opengraphprotocol.org/schema/">
<head>
</head>
<body>

<div><fb:like id="fb_like_btn_iframe" show_faces="no" width="220" href="http://www.pixorial.com"></fb:like></div>
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
  api_key = "<%= FACEBOOK['key'] %>";
  FB.init({
    appId  : api_key,
    status : true, // check login status
    cookie : true, // enable cookies to allow the server to access the session
    xfbml  : true  // parse XFBML
  });

  var like_clicked = function(href, widget){
    $.ajax({
      type : "POST",
      url : '<%= url_for :controller => :gallery, :action => :update_likes %>',
      data : {"url_of_like": href, "type": "like", "authenticity_token": <%= form_authenticity_token.inspect %>}
    });
    parent.likeButtonChanged(href);
  }

  var like_unclicked = function(href, widget){
    $.ajax({
      type : "POST",
      url : '<%= url_for :controller => :gallery, :action => :update_likes %>',
      data : {"url_of_like": href, "type": "unlike", "authenticity_token": <%= form_authenticity_token.inspect %>}
    });
    parent.likeButtonChanged(href);
  }

  $(document).ready(function(){
    FB.Event.subscribe('edge.create', like_clicked);
    FB.Event.subscribe('edge.remove', like_unclicked);
  })
</script>

</body>
</html>
初见终念 2024-10-27 01:36:18

我遇到了同样的问题。非常令人沮丧,因为除了从页面上删除“喜欢”按钮之外似乎没有其他解决方案。

我已针对此问题向 Facebook 提交了错误报告

I have encountered the same issue. Quite frustrating as there doesn't seem to be a solution aside from removing the like button from the page.

I've submitted a bug report to facebook for this issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文