- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Water adventure</title>
<meta charset="utf-8">
<link rel="stylesheet" href="epoch1.css">
<link rel="stylesheet" href="style.css">
</head>
<body class="ancient-world">
<div>
<div class="comet"></div>
<div class="sun-small"></div>
<div class="clouds"></div>
<div class="water"></div>
<div class="ship"></div>
</div>
</body>
</html>
CSS
.ship {
animation-name: move-ship;
animation-duration: 40s;
}
.clouds {
animation-name: move-clouds;
animation-duration: 40s;
}
.sun-small {
animation-name: move-sun;
animation-duration: 10s;
}
@keyframes move-comet {
100% {
transform: translate(500px, 400px);
}
}
You’ve gone to a different page
Goalscompleted
0
- Create an animation
move-clouds
containing a frameto
with atranslateX(-1000px)
transformation, - a
move-sun
animation containing ato
frame with atranslate(350px, -400px)
transformation, - and a
move-ship
animation containing ato
frame with atranslateX(1000px)
tranformation.
- Animate the comet
Comments