Languages
[Edit]
EN

CSS - expanding list on hover

0 points
Created by:
Jan-Alfaro
681

In this article, we would like to show you how to create an expanding list on hover using CSS.

Below we create an expanding list, that expands on hover adjusting the height to the number of elements in the list.

Runnable example:

References

Edit
  1. :hover - CSS | MDN
  2. transition - CSS | MDN
  3. Pseudo-classes - CSS | MDN

Alternative titles

  1. CSS - height: auto from height: 0 with transition effect
  2. CSS - adjust height to number elements in list on hover
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join