【问题标题】:change the css(height) of fb plugin's elements更改 fb 插件元素的 css(height)
【发布时间】:2013-05-20 00:54:51
【问题描述】:

大家好,我可以更改黑框的高度(给定图像中的黑色边框)。 我读到它是由fb控制的。 我尝试从 firebug 更改它的高度(320px),它在浏览器中更改,但我无法更改真正的 css 代码。我什至尝试使用 dom 方法访问 div(class="_4s7c"),但失败了。是真的,我们对此无能为力。请建议我。谢谢

<style>
._4s7c{height:320px !important}
</style>

这是我在查看页面中所做的事情

    <div id="fb-root" style="background: #fff;"><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>`<fb:like-box href="http://www.facebook.com/EverestWomenTreksdotcom/" width="200"  show_faces="true" border_color="#FFFFFF" stream="false" header="false"></fb:like-box>
    </div>

我已经更改了 iframe 的高度,但我需要更改框架内的 div 的高度。

【问题讨论】:

  • 你是在 iframe 中添加这个(插件)吗?
  • @TheDarkKnight 很可能是的。
  • 看这里:stackoverflow.com/questions/9690928/… 这个解决了类似的问题。
  • 我认为创建like box有可能在Facebook中定义宽度

标签: css


【解决方案1】:

试试这个,

#facebookID iframe {
    height:300px !important;
}

#facebookID iframe[style] {
    height:300px !important;
}

将“#facebookID”更改为 html 代码中的真实 id。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-02-22
  • 2012-08-07
  • 1970-01-01
  • 1970-01-01
  • 2017-03-25
相关资源
最近更新 更多