Interactive online courses HTML Academy
2026-03-09 10:57 Diff

The menu items contain links. A block type, size, and background have been set for them: these source styles just need to be uncommented.

In the previous step, we rotated and skewed the menu items, but at the same time we also skewed their contents, that is, the links. To return them to their normal appearance, you need to “deskew” them by skewing them in the reverse direction.

We will “deskew” them by skewing them by the opposite angle, that is, by -30°.

It is more difficult to calculate the reverse angle. Here is the formula:

[reverse angle] = -1 * (90° – ([sector angle] / 2))

In our case, we get:

[reverse angle] = -1 * (90° - (60° / 2)) = -60°

Pay attention to the following order of transforms for the links: first skew, then rotate.

And there is one more important detail to cover. We need to offset the links so that they can fit in the inner half of the menu items. Let’s use margins to do this.