Beispiel:CSS-Hintergrund-4a.html
Aus SELFHTML-Wiki
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>animierter Farbverlauf</title>
<style>
body {
height: 100vh;
width: 100vw;
background-image: linear-gradient(-45deg, #337599, #adc8d6, #dfac20, #e9ac9b, #c32e04 );
background-size: 400% 400%;
animation: gradient 15s ease infinite;
overflow: hidden;
}
@keyframes gradient {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
</style>
</head>
<body>
<h1>animierter Farbverlauf</h1>
</body></html>