2016-08-04 23 views
0

Ich habe einen Held Vollbild bg Abschnitt Bild, das ich die Parallaxe-Effekt hinzugefügt werden soll ich dieses Beispiel gefunden http://pixelcog.github.io/parallax.js/Parallax Abschnitt Scroll

wie immer seine fixiert bleibt nur keine wirkliche Scroll-Bewegung ..

<div id="hero-unit" class="parallax-window" data-parallax="scroll"> 
    <div id="hero-unit-content"> 
     <h1 class="hero-title">Welcome</h1> 
     <p class="hero-subtitle">Click Here Close</p> 
     <p><a class="button subdued-button alt-button" role="button" href="#">Learn more</a></p>    
     </div>  
    </div> 



#hero-unit { 
    width: 100%; 
    height: 100%; 
    background: url(../images/backgrounds/bg.jpg) no-repeat top center; 
    background-color: #000; 
    background-size: cover; 
    background-attachment: fixed; 
    -webkit-background-size: cover; 
    -moz-background-size: cover; 
    -o-background-size: cover; 
} 

#hero-unit-content { 
    position: absolute; 
    width: 100%; 
    bottom: 15%;  

} 

#hero-unit-content h1, #hero-unit-content p { 
    text-align:center; 
    text-transform: uppercase; 
} 


.hero-title { 
    text-shadow:0 2px 2px rgba(0,0,0,0.5); 
    color:#bebebe; 
    font-weight:300; 
    font-size: 60px; 
    font-family: 'Oswald', sans-serif; 
} 

.hero-subtitle { 
    max-width:600px; 
    margin:25px auto; 
    padding:10px 15px; 
    background-image: url(../images/opacity-overlay.png); 
    color:#5d6264; 
    font-weight:500; 
    font-size: 20px; 
    font-family: 'Roboto', sans-serif; 
    letter-spacing: 0.1em; 
} 

Antwort

0

@Amoro Ich habe eine Geige für dich gemacht. bitte prüfen Sie das. Ich hoffe dein Problem wird in dieser Demo gelöst. https://jsfiddle.net/khatrikiran/3rsfaLr5/

+0

Kiran Khatri Ich habe es zur Arbeit, aber mein Held bg ist nicht mehr 100 Höhe – Amoro

0

Bitte ändern Sie CSS und HTML und versuchen Sie es.

<div id="hero-unit" class="parallax-window" data-parallax="scroll" data-image-src="your image path/image.jpg"> 

entfernen Sie Bild in CSS und versuchen Sie es.

+0

Kiran Khatri tut es nichts .. – Amoro

+0

hallo können Sie jede kleine Geige erstellen? zeige ich kann dir was vorschlagen ?? –