We would like to know how to create Accordion with CSS only.
<!--from ww w .ja va 2 s.c om-->
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
nav a {
display: block;
}
summary {
cursor: pointer;
}
summary::-webkit-details-marker {
display: none;
}
</style>
</head>
<body>
<details>
<summary>Heading #1</summary>
<nav>
<a href="#">Link A</a> <a href="#">Link B</a> <a href="#">Link C</a>
</nav>
</details>
</body>
</html>
The code above is rendered as follows: