Css move down animation how to achieve it?

the effect is shown in the figure:

clipboard.png

clipboard.png

when you click, it displays a box that I use to show the hidden implementation, without animation. Now the product requires the box to be animated down when clicked and animated up when closed. How can this be realized?


add a height to the box. After clicking, the height changes from 0 to 100%
assuming that the height is 300, just change the dispalay directly

@keyframes animateName {
  from {
    height: 0;
  }
  to {
    height: 300px;
  }
}

wrote a demo, which I hope will be useful to you.

  https://codepen.io/mudontire/...

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36bb9-4d6d6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36bb9-4d6d6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?