Source Code: (back to article)
<!DOCTYPE html>
<html>
<head>
<title>Заголовок документа</title>
<style>
.element {
padding: 50px;
animation: backgrounds 4s infinite;
}
@keyframes backgrounds {
0% { background-color: #8ebf42}
50% { background-color: #1c87c9; }
100% { background-color: #ccc; }
}
</style>
</head>
<body>
<h2>Пример CSS свойство @keyframes </h2>
<div class="element">Фон текста анимируется.</div>
</body>
</html>