You know how most of the dropdowns behave, they have same size and design and are mostly boring. Today, I tried to create a different kind of dropdowm menu using plain JS, html & css. It changes its size depending on the content or te items that are present in the list.
The idea is simple to have a small div follow your cursor all along and only display when you hover over the list or the items and cover their content.
- CSS3 styling
- window.offset
- getBoundingClientRect()
- mouse eventlistener