- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Moving objects vertically</title>
<meta charset="utf-8">
<link rel="stylesheet" href="world.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="world">
<div class="wizard"></div>
<div class="tree"></div>
</div>
</body>
</html>
CSS
.wizard {
top: 244px;
left: 30px;
}
.tree {
top: 178px;
left: 170px;
}
You’ve gone to a different page
Goalscompleted
0
- Add the
levitate
class to the.wizard
block so that our magician can fly. - Move the magician
200px
up using thetranslateY(-200px)
property. - Move him forward by adding
translateX(280px)
to the property chain. - And also assign
translateY(200px)
to it, and then land our magician on the ground.
Comments