- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Landing, step 3</title>
<meta charset="utf-8">
<link rel="stylesheet" href="epoch5.css">
<link rel="stylesheet" href="style.css">
</head>
<body class="cosmic">
<div class="moon">
<span class="flag"></span>
</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;
}
.fuel {
animation-name: fire;
animation-duration: 1s;
animation-delay: 1s;
animation-fill-mode: forwards;
}
@keyframes fly {
to {
transform: translate(240px, 260px) rotate(-30deg);
}
}
@keyframes fire {
to {
opacity: 0;
}
}
You’ve gone to a different page
Goalscompleted
0
- Create an animation
hoist
, containing a frameto
with atop: -25px
property, - then assign this animation to the flag
.flag
: duration1s
, animation delay2s
,ease-in
type, keep the state after animation.
Comments