15419 shaares
69 liens privés
69 liens privés
1 résultat
taggé
accordeon
Using <details name> to create exclusive accordions
A common use case for accordions is that only one of them should be open at any one time. The addition of the name attribute lets you connect multiple <details> elements and make an accordion exclusive, so only one <details> element with the same name can be open at any time, and the browser toggles all others with the same name to a "closed" state.