P
P
Pavel_Proca2017-04-22 14:19:21
css
Pavel_Proca, 2017-04-22 14:19:21

How can I make the menu appear smoothly?

There is a simple menu here. How to make that when you click on the first element of the submenu, it slowly "floats" from under it.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Belkevich, 2017-04-22
@Pavel_Proca

.submenu {
  max-height: 0;
  overflow: hidden;
  transition: all 1s ease;
}
.submenu.active {
  max-height: 200px;
}

Use max-height in submenu

I
Ilia Okhre, 2017-04-22
@JagIl

use animation and transition

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question