Beispiel:CSS-Hintergrund-4.html
Aus SELFHTML-Wiki
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Einbindung mehrerer Hintergrundgrafiken</title>
<style>
body {
background-image:
url("https://wiki.selfhtml.org/images/1/1c/Cloud.svg"),
linear-gradient(white, skyblue) ;
background-position: 0px 20px;
background-repeat: repeat-x;
animation: wind 10s linear infinite;
color: midnightblue;
min-height: 100vh;
display: grid;
grid-template-rows: 1fr 8em;
}
@keyframes wind{
from { background-position: 0px 20px}
to { background-position: 600px 20px}
}
footer {
background: green linear-gradient(60deg, green, yellow, sienna);
color: black;
}
</style>
</head>
<body>
<h1>Einbindung mehrerer Hintergrundgrafiken</h1>
<footer>
<p>Dieses Beispiel demonstriert die Wirkung der Eigenschaft <code>background-position</code> in Verbindung animation.</p>
</footer>
</body>
</html>