directory

Basic drop-down menu

Instance analysis

The drop-down menu

Drop down content alignment


Use CSS to create a drop-down menu with the mouse over it.

Basic drop-down menu

A drop-down menu appears when the mouse moves over the specified element.

    <style>
    .dropdown {
        position: relative;
        display: inline-block;
    }
    .dropdown-content {
        display: none;
        position: absolute;
        background-color: #f9f9f9;
        min-width: 160px;
        box-shadow: 0px 8px 16px 0px rgba(0.0.0.0.2);
        padding: 12px 16px;
Copy the code