- 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
levitateclass to the.wizardblock so that our magician can fly. - Move the magician
200pxup using thetranslateY(-200px)function. - Move him forward by adding
translateX(280px)to the list of transform functions. - And also add
translateY(200px)to bring our magician back down to the ground.
Comments