是的,如标题所示,Facebook 评论插件在滚动时会覆盖我的标题 div。
这是之前滚动:
这是在滚动之后:
标题栏的样式:
#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/