Programming Exercises

Create a CSS-only dropdown menu with smooth open and close animations.

Hard

Problem Statement

Create a CSS-only dropdown menu with smooth open and close animations.

Sample Output

The dropdown smoothly opens and closes on hover.

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
<!DOCTYPE html> <html> <head> <style> /* Add CSS here to style the dropdown menu */ </style> </head> <body> <div class="menu"> <button class="menu-button">Menu</button> <ul class="dropdown"> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> </div> </body> </html>
Log in or sign up to run or submit your code.Log inSign up
Expected Output
The dropdown smoothly opens and closes on hover.