- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Rocket to the launch pad, step 2</title>
<meta charset="utf-8">
<link rel="stylesheet" href="epoch5.css">
<link rel="stylesheet" href="style.css">
</head>
<body class="cosmic">
<div class="earth">
<div class="rocket departure">
<span class="fuel"></span>
</div>
</div>
</body>
</html>
CSS
.fuel {
animation-name: fire;
animation-duration: 1s;
animation-fill-mode: forwards;
}
@keyframes fire {
to {
opacity: 1;
}
}
Goalscompleted
- Create an animation
fly
containing a frameto
with atransform: rotate(40deg) translate(0px, -500px)
transformation, - then assign this animation to the rocket
.rocket
: duration1s
, animation delay1s
,ease-in
type, keep the state after animation.