[英]Facebook Comment Plugin override my header div when scrolling
是的,就像標題中一樣,滾動時, Facebook Comment Plugin會覆蓋我的標題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 Plugin的代碼是:
<fb:comments href="<?php echo $facebook_href; ?>" width="655" num_posts="4"></fb:comments>
設置標題的z-index
是否有幫助?
#header {
/* ... */
z-index: 9999;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.