2 ms·
It's also possible to implement drop-down menus using CSS, with zero JavaScript. https://www.grc.com/menudemo.htm https://www.grc.com/menudemo.htm
by MaxBarraclough 6y ago
It's also possible to implement drop-down menus using CSS, with zero JavaScript.
https://www.grc.com/menudemo.htm https://www.grc.com/menudemo.htm
- Grumbledour 6y agoIt is and there is no reason not to do it this way just because it has been around for a long time. However, for accessibility reasons, Son of Suckerfish[0] works a bit better. It moves hidden items out of the viewport instead of using display: none, thus making the menu usable to screenreaders users without them having to "hover". It would of course also be advisable, to expand the :hover to also inlclude :focus. [0] https://www.htmldog.com/articles/suckerfish/dropdowns/ https://www.htmldog.com/articles/suckerfish/dropdowns/
- userbinator 6y ago...and that works all the way back to at least IE6.