html - Facebook 评论插件在滚动时覆盖我的标题 div

标签 html css facebook

是的,如标题所示,Facebook 评论插件在滚动时会覆盖我的标题 div。

这是之前滚动: enter image description here

这是滚动之后: enter image description here

标题栏的

样式:

#header {
    height:45px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0.95;
    background: #2D2D2D;
}
#colorbars {
    border-top: 3px solid #DD5044;
    height:42px;
    border-bottom: 8px solid rgba(40, 40, 40, .2);
}
#headercontainer {
    width: 940px;
    overflow: hidden;
    margin: 0 auto 0 auto;
}
标题栏的

HTML:

<div id="header"><header id="colorbars"><div id="headercontainer">
// content
</div></header></div>

Facebook 插件的代码是:

<fb:comments href="<?php echo $facebook_href; ?>" width="655" num_posts="4"></fb:comments>

最佳答案

设置标题的 z-index 有帮助吗?

#header {
    /* ... */
    z-index: 9999;
}

关于html - Facebook 评论插件在滚动时覆盖我的标题 div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14007045/

相关文章:

javascript - 动态 php 和 html 表单,带有数量、价格和总 JavaScript 计算

html - 排列两组列

javascript - 在 PHP 中使用长 HTML 与 CSS 和 JavaScript 会在 PhpStorm 中生成错误

facebook - 在 Facebook 应用程序中与 Facebook 广告提供商集成

javascript - jQuery 窗口宽度不等于 CSS 的窗口宽度

html - SASS/SCSS 是一种制作 OOCSS 的方法吗?

html - 如何使用 Repeat 和 Calc 根据 View 宽度生成 Grid 行

java - 我如何连接到 Facebook/Twitter/等。在 J2ME 应用程序中?

ios - Facebook iOS SDK 对话框键盘问题

html - 如何设置仅适用于下方控件的 STYLE?