мне нудно чтобы картинка менялась когда нажимаешь на кнопку из (--unchecked-image-url) в (--checked-image-url)

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');

.question {
  width: 100%;
  border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  padding-top: 15px;
  padding-left: 20px;
  justify-content: space-between;
  align-items: center;
  flex-direction: column;



  & > input {
    display: none; 
  }
  
  & > p {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.9s ease-out;
    font-size: 10px;
  }

  & > input[type="checkbox"]:checked ~ p {
    max-height: 200px;
    transition: max-height 0.9s ease-out;
    
  }

  & > label::after {
    content: '';
    width: 50px;
    height: 50px;
    position:absolute;
    background-size: cover;
    background-image: var(--unchecked-image-url);
    
    

  }
  & > label::before{
    content: '';
    width: 50px;
    height: 50px;
    position:absolute;
    background-size: cover;
    background-image: var(--checked-image-url);
  }
}

.poppins_headline,
.poppins_subheadline {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  text-align: center;
}

.poppins_headline {
  font-size: 10px;
  opacity: 60%;
  margin-top: 10px;
}

.poppins_subheadline {
  font-size: 50px;
  margin-top: -10px;
}

Ответы (0 шт):