【问题标题】:Facebook Page Feed - Full HeightFacebook 页面提要 - 全高
【发布时间】:2017-05-04 23:11:57
【问题描述】:

正如标题所说。我想插入一个延伸到窗口末尾的 FB 页面提要。这可能吗?当我在 iframe 上设置它时,我认为 800px 是它想要达到的最高值。我到处寻找答案,但没有运气。

我当然用过Facebook page plugin。这是我的代码大纲,使用 Bootstrap 4。

.card {
  position: fixed;
  width: 340px;
  height: 100vh;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="card p-0">
  <iframe src="https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2FMercedesAMG&tabs=timeline&width=340&height=500&small_header=false&adapt_container_width=true&hide_cover=false&show_facepile=true&appId" width="340" height="500" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe>
</div>

谢谢!

【问题讨论】:

    标签: html css facebook iframe plugins


    【解决方案1】:

    可以通过您的应用仪表板(在 Facebook 开发者网站上)设置默认高度。将其设置为 'fluid' 应该可以让您即时调整其大小。

    那么您应该将 100% height 应用到 iframe 本身,并为您的容器设置 min-height

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-04-05
      • 1970-01-01
      • 2012-04-28
      • 1970-01-01
      • 1970-01-01
      • 2011-11-20
      • 2011-11-17
      • 1970-01-01
      相关资源
      最近更新 更多