Facebook JS影响CSS / @ font-face在IE? [英] Facebook JS affecting CSS/@font-face in IE?

查看:119
本文介绍了Facebook JS影响CSS / @ font-face在IE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我似乎注意到Facebook的JS

I seem to notice that Facebook's JS

<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#appId=APP_ID&amp;xfbml=1"></script>

似乎会影响我的网站在IE的CSS。例如。说头使用font1和body使用font2。有时,在IE所有字体使用font1或甚至交换,标题使用font2和身体使用font1 ...它似乎也影响一些 PIE CSS stuff。任何人有相同的问题?

seems to affect my site's CSS in IE. eg. say headers use font1 and body use font2. sometimes, in IE all fonts use font1 or even swap, headers used font2 and body use font1 ... It also seem to affect some PIE CSS stuff. Anyone having the same problem?

推荐答案

我有同样的问题。我使用下载的字体为我的标题和在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.

这篇关于Facebook JS影响CSS / @ font-face在IE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆