且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Facebook JS影响CSS / @ font-face在IE?

更新时间:2023-11-10 15:03:16

我有同样的问题。我使用下载的字体为我的标题和在IE8,Facebook Javascript拧紧了字体。这发生在我结构化我的代码在我假设是正确的架构 - Facebook Javascript包括在我的标题与我的JavaScript的其余部分包括。

I had the exact same problem. I use a downloaded font for my headers and on IE8, the Facebook Javascript screwed up the fonts. This occurred when I structured my code in what I assumed was the proper architecture - the Facebook Javascript include was up in my header with the rest of my Javascript includes.

当我

    <div id="facebooklike" style="position: absolute; left: 645px; top: -37px;">
    <div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://www.tripinsurance.com" send="false" width="350" show_faces="false" font="arial"></fb:like>
    </div>

我认为如果Facebook代码在div加载到页面之前加载。

I think the issue may be happening if the Facebook code is loaded before the the div loads on the page.