<!DOCTYPE html>
<html>
<head>
<title>Заголовок документа</title>
<style>
div {
width: 10px;
height: 100px;
background: red;
border-radius: 50%;
position: relative;
-webkit-animation: element 4s infinite;
animation: element 4s infinite;
}
@-webkit-keyframes element {
0% {top: 0px; background: #1c87c9; width: 100px;}
100% {top: 200px; background: #8ebf42; width: 150px;}
}
@keyframes element {
0% {top: 0px; background: #1c87c9; width: 100px;}
100% {top: 200px; background: #8ebf42; width: 150px;}
}
</style>
</head>
<body>
<h2>Пример правила @keyframes</h2>
<div></div>
</body>
</html>