.accordion { background-color: #fff; color: #424242; cursor: pointer; padding: 18px; width: 100%; border: none; text-align: left; outline: none; font-size: 20px; transition: 0.4s; } .active, .accordion:hover { background-color: #868686; } .accordion:after { content: '\002B'; color: #777; font-weight: bold; float: right; margin-left: 5px; } .active:after { content: '\2212'; } .panel { padding: 0 18px; background-color: #fcfcfc; max-height: 0; overflow: hidden; transition: max-height 0.2s ease-out; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter