Как сделать так, чтобы при нажатии на класс left__item, менялся цвет картинки и добавился элемент с классом "line"

HTML

<li class="left__item">
  <span class="image"></span>
  Heading title one
</li>

CSS

.left__item {
  font-family: Raleway;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 400;
  color: #9fa9a9;
  display: flex;
  align-items: center;
  width: 250px;
  justify-content: space-between;
  position: relative;
}
.image{
  display: block;
  width: 50px;
  height: 30px;
  background: red;
}
.line {
  content:"";
  position: absolute;
  right: -68px;
  width: 11px;
  height: 80px;
  background-color: #5dca88;
}

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