Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

CSS Level 13 Lesson 4 - CSS 3D Transform

Code:
<!DOCTYPE html>
<html>
<head>
<title>CSS transform property</title>
<style>
div{
width: 150px;
height: 80px;
background-color: #4535aa;
color: white;
}
.translate-me
{
transform-origin: 0 0;
/ Apply transform property here /
transform: perspective(200px) [translate3d(0 0 75px)];
}

</style>
</head>
<body>
<div class="translate-me">Transform me!</div>
</body>
</html>

I followed the instructions but, still, there is an error which says: Use the translate3d property for translation on Z-axis.
by

1 Answer

Ashutoshry6u3
/here is your answer*/

<!DOCTYPE html>
<html>
<head>
<title>CSS transform property</title>
<style>
div{
width: 150px;
height: 80px;
background-color: #4535aa;
color: white;
}
.translate-me
{
transform-origin: 0 0;
/* Apply transform property here
/
transform: perspective(200px) translate3d(0, 0, 75px);
}

</style>
</head>
<body>
<div class="translate-me">Transform me!</div>
</body>
</html>

Login / Signup to Answer the Question.