How to Animate the Details Element
TLDRThe tricks? Turn off the default triangle: details summary::-webkit-details-marker { display:none; } . You can’t animate that one. Make a replacement triangle with the CSS border trick and a pseudo element. Animate the new triangle when the state is open: details[open] > summary::before { transform: rotate(90deg); } .
2 Comments
Sort: