2016-04-08 25 views
0

我不知道如何擺脫背景圖像再次顯示,猜想它與&有關:以前,我希望你能幫助我。 Thx提前。我該如何擺脫在底部再次出現的背景圖像?

http://codepen.io/ctrprt253/pen/qZVKKG

.bg-image{ 
    background: $color-primary; 
    text-align: center; 
    position: relative; 
    z-index: 1; 
    overflow: hidden; 
    //text-shadow: 2px 0 5px black; 

    &:before{ 
    content: ''; 
    display: block; 
    position: absolute; 
    top: 0; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    width: 100%; 
    height: 100%; 
    z-index: -1; 
    background: #333  url('https://1.bp.blogspot.com/-6E1qWDwgvPE/UW1IxACizzI/AAAAAAAAAOc/5COs8aubq4c/s1600/the_art_of_conversation_by_rttmsdag-d32q8oc.jpg') no-repeat top center; 
    background-size: cover; 
    background-attachment: fixed; 
    filter: blur(5px); 
    opacity: .8; 
    transform: scale(0.8); 
    } 

回答

0

改變這一行:

background: #333  url('https://1.bp.blogspot.com/-6E1qWDwgvPE/UW1IxACizzI/AAAAAAAAAOc/5COs8aubq4c/s1600/the_art_of_conversation_by_rttmsdag-d32q8oc.jpg') no-repeat top center; 

到那個:

background: #333; 

你可以刪除這些行:

background-size: cover; 
background-attachment: fixed; 

See it here

+0

Thx,但它也在標題中消失,我只是需要擺脫它,當它出現在第二次底部。 任何想法? –

+0

然後刪除底部容器中的類'bg-image':http://codepen.io/anon/pen/wGpExZ –

+0

太棒了,非常感謝您的快速響應! :) –