Ich versuche parallax scrolling und alles funktioniert gut. Aber was ich will, ist, dass die Hintergrundbilder die gesamte Breite der Seite (wie in Rand zu Rand) verwenden, aber es ist ein kleiner Rand links auf beiden Seiten des Hintergrunds.Wie Hintergrundbildbreite als Rand zu Rand eingestellt werden
Hier ist mein Code:
.container{
\t max-width: 100%;
\t margin: 0 auto;
\t background: aqua;
\t font-size: 24px;
\t padding: 25px;
}
.parallax{
\t width: 100%;
\t background: url('Baradari.jpg') no-repeat center;
\t background-size: cover;
\t background-attachment: fixed;
\t height: 500px;
}
.parallax2{
\t width: 100%;
\t background: url('rumi-darwaza.jpg') no-repeat center;
\t background-size: cover;
\t background-attachment: fixed;
\t height: 500px;
}
.parallax3{
\t width: 100%;
\t background: url('rumi-darwaza.jpg') no-repeat center;
\t background-size: cover;
\t background-attachment: fixed;
\t height: 500px;
}
<!DOCTYPE html>
<html>
\t <head>
\t \t <meta charset="utf-8">
\t \t <title>Parallax</title>
\t \t <link rel="stylesheet" href="style.css">
\t </head>
\t <body>
\t \t <div class="container">
\t \t \t <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
\t \t </div>
\t \t <div class="parallax">
\t \t </div>
\t \t <div class="container">
\t \t \t <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
\t \t </div>
\t \t <div class="parallax2">
\t \t </div>
\t \t <div class="container">
\t \t <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
\t \t </div>
\t \t <div class="parallax3">
\t \t </div>
\t \t <div class="container">
\t \t \t <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry.
\t Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
\t It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
\t It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
\t \t </div>
\t </body>
</html>
versuchte ich position: absolute;
und left: 0px;
in allen Parallaxe Klassen einstellen, aber es würde alle Bilder machen zusammen kommen und die schriftlichen Teil versteckt wird. bitte helfen!