<input type="checkbox" id="faq-1">
<h2><label for="faq-1">How much?</label></h2>
<p>She said for $300 she'll do it.</p>

<input type="checkbox" id="faq-2">
<h2><label for="faq-2">How many cans must I stack up?</label></h2>
<p>As many as you need to wash you out from my mind and out of my consciousness.</p>
<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.</p>
div { position: relative; }
input[type=checkbox] {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   opacity: 0;
h2 {
  font-size: 30px;
  font-weight: 400;
  color: #4a19ff;
  margin: 60px 0 10px 0;
label {
   cursor: pointer;
label {
  position: relative;
  display: block;
  padding-left: 30px;
label:before {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  top: 50%;
  left: 10px;
  border-left: 8px solid black;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-top: -8px;
input[type=checkbox]:checked ~ h2 label:before {
  border-left: 8px solid transparent;
  border-top: 8px solid black;
  border-right: 8px solid transparent;
  margin-left: -4px;
  margin-top: -4px

p {
  max-height: 0;
  overflow: hidden;
  padding-left: 30px;
  transition: max-height 0.4s ease;
  font-family: 'Habibi', serif;
input[type=checkbox]:checked ~ h2 ~ p {
  max-height: 80px;

body {
   background: #fbbe05;
   padding: 40px;
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.