<div id="description">
  <h2>Приклад 1</h2>
  <p>Наведіть курсор на елемент, щоб побачити зміну кольору.</p>
</div>

<div id="result">
  <div class="box"></div>
</div>
#description {
  background: #f1f1f1;
  padding: 20px;
  font-family: Arial, sans-serif;
}

#result {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
}

.box {
  width: 150px;
  height: 150px;
  background-color: lch(50% 130 20);
  transition: background 0.3s ease;
}

.box:hover {
  background-color: lch(20% 75 70);
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.