【问题标题】:Change font size for Facebook Comments Social Plugin – Number of Comments on page更改 Facebook 评论社交插件的字体大小 - 页面上的评论数
【发布时间】:2013-06-21 20:48:32
【问题描述】:

所以我试图在显示给定页面的 cmets 数量时增加字体大小。我正在使用 Facebook 提供的 iFrame 代码。最初我将 CSS 属性直接添加到 iFrame 中,但没有成功。从那时起,我一直在尝试使用 Javascript 来改变 iFrame 的样式。有什么想法吗?

<iframe id="FBFrame" src="<?php echo $FBURL; ?>" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:130px; height:16px;" allowTransparency="true"></iframe> 

<script>
   document.getElementById('FBFrame').style.fontSize = "20px";
</script>  

【问题讨论】:

    标签: javascript facebook iframe facebook-comments


    【解决方案1】:

    你必须用 css 来做这件事,因为 javascript 被阻止了

    类似

    #facebook body{
    //facebook is the document id facebook gives to the iframe content
    font-size:20px
    }
    

    应该工作

    【讨论】:

    • 我将上述 CSS 添加到我的一个样式表中,但它未能覆盖 Facebook 的 iFrame 属性。
    • 尝试添加!important;
    猜你喜欢
    • 1970-01-01
    • 2011-12-29
    • 1970-01-01
    • 2012-10-23
    • 2011-12-19
    • 1970-01-01
    • 1970-01-01
    • 2012-04-17
    • 2012-03-30
    相关资源
    最近更新 更多