CSS CSS Transitions and Transforms Transition Timing Functions and Delays Timing Functions and Delays Challenge

Hiroki Nishikawa
Hiroki Nishikawa
767 Points

CSS Transition

.icon { transition-property: right; transition-duration: .4s; transition-delay: .3s; transition-timing-function: ease-in-out; }

style.css
/* nav-item transitions ---------- */

.nav-item {
    transition-duration: .5s;
  flex-grow: 1;
}

.nav-item:hover {
    transition-property: flex-grow;
    transition-duration: .5s;
  flex-grow: 2;
  transition-timing-function: ease-out;
}

/* nav icon transitions ---------- */

.icon {
  right: -25px;
}

.nav-item:hover .icon {
    right: 12%;
    transition-timing-function: ease-in-out;

}

.icon {
    transition-property: right;
  transition-duration: .4s;
transition-delay: .3s;
 transition-timing-function: ease-in-out;
}
index.html
<!DOCTYPE html>
<html>
<head>
    <title>CSS Transitions</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    <link rel="stylesheet" href="page.css">
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <div class="container">

        <nav class="nav">
            <a class="nav-item" href="#">About <i class="icon material-icons">person</i></a>
            <a class="nav-item" href="#">Work <i class="icon material-icons">work</i></a>
        </nav>

    </div>
</body>
</html>

1 Answer

nico dev
nico dev
20,360 Points

Hi Hiroki Nishikawa ,

Not sure if you refer to the 1st step of the challenge?

If so, it seems it's asking for the shorthand property, that is, when you use the transition property, instead of the transition-property, -duration, -delay, etc.

It also seems it's requesting to call the shorthand on the .nav-item, not on the :hover.