Interactive online courses HTML Academy
2026-03-09 12:29 Diff

So the time has now come for us to put the knowledge that we gained to good use: early in the morning, a wolf attacked the city where Pendalf lives!

In the midst of all of the confusion, our wizard was not able to conjure up any fireballs, so now we need to urgently repair the collapsed fence.

To do this, you need to collect your wits and quickly remember everything you know. You will also need to master a couple of new techniques.

In this assignment, we need a transform with the transform: rotate rotation function. Its syntax is as follows: transform: rotate(skew angle).

A positive value for the angle will rotate the object clockwise, while a negative angle will rotate it counterclockwise. The rotation unit is the degree (deg). For example, transform: rotate(180deg) will rotate the object 180° clockwise. In other words, it will flip it.

There is just one subtle detail to keep in mind when applying rotation and movement transforms at the same time. When you rotate an object by a given angle, its entire coordinate system rotates together with it.

In other words, to make sure that a block that has been rotated 90° moves horizontally, we need to apply translateY. If instead we wanted the block to move vertically, then we would apply translateX.