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

The hamburger is ready! Now let’s work on its open state, in which it will turn into an arrow.

We will rotate the icon when it is in an open state. We will shorten the upper and lower strips a little so that we can turn them into an arrow “pointer” in the next step.

To switch to the open state, we will add the menu-icon-open class to the icon. Of course, we will perform the class switching using JavaScript on click. But to make the process of creating an arrow more visual, we added a second icon to the HTML code already in its open state.