[英]CSS - Background-image
我已經為菜單的背景設置了background-image
以及菜單后面的黑條: http : //www.cochlea.co.il/
background-image: url("http://www.cochlea.co.il/wp-content/uploads/2015/07/bar.png");
background-repeat: no-repeat;
background-position: inherit;
但是,有時不會加載黑色背景。 有時當您向下滾動然后向上滾動時,它消失了。
有什么問題?
非常感謝。
我注意到,每當向下滾動時,它就會隱藏起來。
那么如果您刪除背景圖像並允許背景為黑色呢?
使用此代碼
.main-navigation ul {
list-style: none;
margin: 0;
display: inline;
background: #000;
padding: 5px;
border-radius: 28px;
padding-left: 30px;
padding-right: 30px;
}
.theNavigationBar {
position: absolute;
width: 100%;
top: 15px;
left: 0;
text-align: center;
font-weight: bold;
/* background-image: url("http://www.cochlea.co.il/wp-content/uploads/2015/07/bar.png"); */
/* background-repeat: no-repeat; */
/* background-position: inherit; */
/* letter-spacing: 0.5px; */
}
它將執行與背景圖片相同的目的。 因此,只需使用上面的代碼。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.