why is transition not showing?

Viewed 45

I have been trying to add transition, but for some reason it's not displaying.

@media screen and (max-width: 980px) {
 .nav__menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--body-color);
    padding: 2rem 1.5rem 4rem;
    box-shadow: 0 -1px 4px rgba(0,0,0,.15);
    border-radius: 1.5rem 1.5rem 0 0;
    transition: 0.3s;
  } 
}
1 Answers

.nav__menu{
    position: relative;
    top:0;
    left:0;
    width: 50px;
    height: 50px;
    background: red;
    transition: background .3s,transform 1s;
}
/*for hover*/
.nav__menu:hover{
  background: blue;
}
/*for click*/
.nav__menu:active{
  transform: rotate(360deg);
}
you should add somthink will happen when click or hover 
<br/>
<br/>
<br/>
<br/>
<br/>
try hover box and try click it
<nav class="nav__menu"></nav>
<br/><br/><br/><br/>



note: this only example you can use it for your code and do awsome code <3

Related