.object {
animation: MoveUpDown 1s linear infinite;
position: absolute;
left: 0;
bottom: 0;
}
@keyframes MoveUpDown {
0%, 100% {
bottom: 0;
}
50% {
bottom: 100px;
}
}
<div class="object">
hello world!
</div>
.object {
animation: MoveUpDown 1s linear infinite;
position: absolute;
left: 0;
bottom: 0;
}
@keyframes MoveUpDown {
0%, 100% {
transform: translateY(0);
}
50% {
transform: translateY(-100px);
}
}
<div class="object">
hello world!
</div>
div {
-webkit-animation: action 1s infinite alternate;
animation: action 1s infinite alternate;
}
@-webkit-keyframes action {
0% { transform: translateY(0); }
100% { transform: translateY(-10px); }
}
@keyframes action {
0% { transform: translateY(0); }
100% { transform: translateY(-10px); }
}
<div>↓</div>