- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Landing, 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="moon"></div>
<div class="rocket arrival">
<span class="fuel"></span>
</div>
</body>
</html>
CSS
.rocket {
animation-name: fly;
animation-duration: 1.5s;
animation-timing-function: ease-out;
animation-fill-mode: forwards;
}
@keyframes fly {
to {
transform: translate(240px, 260px) rotate(-30deg);
}
}
You’ve gone to a different page
Goalscompleted
0
- Create an animation
fire
, containing a frameto
with a propertyopacity: 0
, - Then assign this animation to our fuel
.fuel
: duration1s
, start delay1s
, keep the state after animation.
Comments