<div class="accordion-menu">
<details open>
<summary>👤 My Account</summary>
<ul>
<li><a href="#">Profile</a></li>
<li><a href="#">Settings</a></li>
<li><a href="#">Billing</a></li>
</ul>
</details>
<details>
<summary>📊 Analytics</summary>
<ul>
<li><a href="#">Reports</a></li>
<li><a href="#">Overview</a></li>
</ul>
</details>
<details>
<summary>💬 Messages</summary>
<ul>
<li><a href="#">Inbox</a></li>
<li><a href="#">Sent</a></li>
<li><a href="#">Archived</a></li>
</ul>
</details>
</div>.accordion-menu {
font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
max-width: 250px;
background: #fff;
border-radius: 12px;
box-shadow: 0 4px 15px rgba(0,0,0,0.05);
overflow: hidden;
border: 1px solid #e5e7eb;
}
details {
border-bottom: 1px solid #f3f4f6;
}
details:last-child {
border-bottom: none;
}
summary {
padding: 15px;
font-weight: 600;
cursor: pointer;
list-style: none;
color: #374151;
display: flex;
align-items: center;
justify-content: space-between;
transition: background 0.2s;
}
summary:hover {
background: #f9fafb;
}
summary::-webkit-details-marker {
display: none;
}
summary::after {
content: "+";
font-size: 1.2rem;
color: #9ca3af;
}
details[open] summary::after {
content: "-";
}
ul {
list-style: none;
padding: 0;
margin: 0;
background: #f9fafb;
}
li a {
display: block;
padding: 10px 15px 10px 40px;
text-decoration: none;
color: #6b7280;
font-size: 0.9rem;
transition: color 0.2s;
}
li a:hover {
color: #2563eb;
background: #f3f4f6;
}Nothing to show yetType HTML, CSS or JavaScript and your page appears here.
Click any element to find its code Esc
Check this code before you run it
It came from a shared link. It runs with fewer permissions, so it cannot open pop-ups, submit forms or start downloads.
0.00s / 0.00s
Nothing has animated yet. Hover, click or type in the preview and each CSS animation, transition or
element.animate() call shows up here as it plays.