<!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: backwards;
}
@keyframes example {
from {top: 0px; background-color: yellow;}
to {top: 200px;}
}
</style>
</head>
<body>
<h1>CSSアニメーション</h1>
<p>アニメーションが開始される前(アニメーション遅延期間中)、最初のキーフレームによって設定されたスタイル値をdiv要素に取得させます。</p>