CSS Color Fading

Developer
Size
1,975 Kb
Views
16,192

How do I make an css color fading?

Sketch to play with css keyframes and hsl colors. What is a css color fading? How do you make a css color fading? This script and codes were developed by Moklick on 20 November 2022, Sunday.

CSS Color Fading Previews

CSS Color Fading - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>CSS Color Fading</title> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ *{ margin:0; padding:0;
}
body,html{ height:100%;
}
.box{ width:10%; height:100%; float:left; background: hsl(0,80%,60%);
}
.a{ animation: colorfade 8s ease infinite;
}
.b{ animation: colorfade 8s .5s linear infinite;
}
.c{ animation: colorfade 8s 1s linear infinite;
}
.d{ animation: colorfade 8s 1.5s linear infinite;
}
.e{ animation: colorfade 8s 2s linear infinite;
}
.f{ animation: colorfade 8s 2.5s linear infinite;
}
.g{ animation: colorfade 8s 3s linear infinite;
}
.h{ animation: colorfade 8s 3.5s linear infinite;
}
.i{ animation: colorfade 8s 4s linear infinite;
}
.j{ animation: colorfade 8s 4.5s linear infinite;
}
@keyframes colorfade{ 0% { background: hsl(0,80%,60%); } 25% { background: hsl(90,80%,60%); } 50% { background: hsl(180,80%,60%); } 75% { background: hsl(270,80%,60%); } 100% { background: hsl(360,80%,60%); }
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div class="box a"></div>
<div class="box b"></div>
<div class="box c"></div>
<div class="box d"></div>
<div class="box e"></div>
<div class="box f"></div>
<div class="box g"></div>
<div class="box h"></div>
<div class="box i"></div>
<div class="box j"></div>
</body>
</html>

CSS Color Fading - Script Codes CSS Codes

*{ margin:0; padding:0;
}
body,html{ height:100%;
}
.box{ width:10%; height:100%; float:left; background: hsl(0,80%,60%);
}
.a{ animation: colorfade 8s ease infinite;
}
.b{ animation: colorfade 8s .5s linear infinite;
}
.c{ animation: colorfade 8s 1s linear infinite;
}
.d{ animation: colorfade 8s 1.5s linear infinite;
}
.e{ animation: colorfade 8s 2s linear infinite;
}
.f{ animation: colorfade 8s 2.5s linear infinite;
}
.g{ animation: colorfade 8s 3s linear infinite;
}
.h{ animation: colorfade 8s 3.5s linear infinite;
}
.i{ animation: colorfade 8s 4s linear infinite;
}
.j{ animation: colorfade 8s 4.5s linear infinite;
}
@keyframes colorfade{ 0% { background: hsl(0,80%,60%); } 25% { background: hsl(90,80%,60%); } 50% { background: hsl(180,80%,60%); } 75% { background: hsl(270,80%,60%); } 100% { background: hsl(360,80%,60%); }
}
CSS Color Fading - Script Codes
CSS Color Fading - Script Codes
Home Page Home
Developer Moklick
Username moklick
Uploaded November 20, 2022
Rating 3
Size 1,975 Kb
Views 16,192
Do you need developer help for CSS Color Fading?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Moklick (moklick) Script Codes
Create amazing Facebook ads with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!