<div id="description">
  <h2>Приклад 1</h2>
  <p>Наведіть курсор на квадрат, щоб побачити зміну градієнта.</p>
</div>
<div id="result">
  <div class="square"></div>
</div>
#description {
  font-style: italic;
  text-align: center;
  line-height: 1.5;
  margin-bottom: 50px;
  padding: 12px 16px;
  background-color: #f7f7f7;
  border: 1px solid #ccc;
}

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

.square {
  width: 200px;
  height: 200px;
  background: conic-gradient(red, blue);
  transition: background 0.5s ease;
}

.square:hover {
  background: conic-gradient(blue, green);
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.