Passing down the legacy

Report a typo

Alice has become a great developer and now she is trying to mentor some new employees in the company she is working at. She has created a task for them to learn some of the basics of translating and rotating elements with the power of CSS and HTML.

Before she assigns the task to the new employees, she wants someone to run the exercise as peer review. Could you solve this task for her?

The task is the following:

Create an element shaped like a square that is 200px in width and height, then rotate it by 60 degrees. And, as a final step, use percentages to translate it 10 pixels on the X-axis and 20 pixels on the Y-axis.

Write HTML and CSS code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Document</title>
</head>
<body>
<div class="element"></div>
</body>
</html>
Completed 1 of 3
Add the size of the element (width and height)
Add the transformation needed (rotate and translate)
___

Create a free account to access the full topic