- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
  <head>
    <title>The transformer icon, step 2</title>
    <meta charset="utf-8">
    <link rel="stylesheet" href="material.css">
    <link rel="stylesheet" href="style.css">
  </head>
  <body class="blue-theme">
    <section class="card card-bordered">
      <div class="menu-icon">
        <span></span>
      </div>
      <div class="menu-icon menu-icon-open">
        <span></span>
      </div>
    </section>
  </body>
</html>
CSS
.menu-icon span {
  display: block;
  width: 100%;
  height: 12px;
  background-color: #40d47e;
}
.menu-icon span::before,
.menu-icon span::after {
  display: block;
  width: 100%;
  height: 12px;
  background-color: #40d47e;
  content: "";
}
.menu-icon span::before {
  transform: translate(0, -24px);
}
.menu-icon span::after {
  transform: translate(0, 12px);
}
.menu-icon-open span {
}
.menu-icon-open span::before,
.menu-icon-open span::after {
}
You’ve gone to a different page
Goalscompleted
0
- Set a width of 60%for.menu-icon-open span::beforeand.menu-icon-open span::after.
- Set a rotate(180deg)transform for.menu-icon-open span.
Comments