Firefox Like Button不显示在Firefox中 [英] Facebook Like Button not displaying in Firefox
问题描述
我正在试图弄清楚为什么我的Facebook的按钮不会显示在Firefox的网站上的一个有限的(数量的)页面上。在网站的其他部分,我已经得到FB的按钮来显示,但在这个特殊情况下,我没有。任何想法?
I am trying to figure out why my Facebook like button isn't displaying on a limited (number of?) page on my site with Firefox. In other parts of the site, I have gotten the FB like button to display but in this particular instance, I have not. Any ideas?
推荐答案
在FB共享元素中更深入嵌套的一些元素具有宽度和高度为0,所以即使它们显示在DOM中,如果您使用Firebug进行检查,它们也不可见。我通过给第一个span元素和iframe元素通过CSS赋予宽度和高度来解决这个问题。
Some of the elements nested deeper in that FB share element have a width and height of 0, so they are not visible even though they are showing up in the DOM if you inspect with Firebug. I solved this by giving a width and height to the first span element and the iframe element via CSS.
.fb_iframe_widget iframe {
height: 100px;
position: absolute;
width: 100px;
}
.fb_iframe_widget span {
display: inline-block;
position: relative;
text-align: justify;
vertical-align: text-bottom;
width: 100px;
height: 100px;
}
这些是元素,但您必须将宽度和高度更改为你想要什么。
Those are the elements but you'll have to change the width and height to what you want.
这篇关于Firefox Like Button不显示在Firefox中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!