<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 100px;
height: 100px;
background: red;
position: relative;
animation-name: example;
animation-duration: 3s;
animation-delay: 2s;
animation-fill-mode: both;
}
@keyframes example {
from {top: 0px; background-color: yellow;}
to {top: 200px; background-color: blue;}
}
</style>
</head>
<body>
<h1>CSSアニメーション</h1>
<p>div要素は、アニメーションの開始前に最初のキーフレームで設定されたスタイル値を取得し、アニメーションの終了時に最後のキーフレームのスタイル値を保持します。</p>