简体   繁体   English

Facebook Comment Plugin滚动时覆盖我的标题div

[英]Facebook Comment Plugin override my header div when scrolling

Yes, like in the title, the Facebook Comment Plugin override my header div when scrolling. 是的,就像标题中一样,滚动时, Facebook Comment Plugin会覆盖我的标题div。

This is before scrolling: 这是滚动之前 在此处输入图片说明

This is after scrolling: 这是滚动之后 在此处输入图片说明

Style of header bar: 标题栏样式

#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 of header bar: 标题栏的HTML

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

And code of Facebook Plugin is: Facebook Plugin的代码是:

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

Does setting the z-index of the header help? 设置标题的z-index是否有帮助?

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM