Loading…
Everything will be ready in few seconds
- Theory
- Theory
- Comments
The transformer icon, step 2
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.
- index.html
- style.css
Thanks! We’ll fix everything at once!
The code has changed, click “Refresh” or turn autorun on.
You’ve gone to a different page
Click inside the mini-browser to shift the focus onto this window.
Comments