<div id="description">
  <h2>Приклад 2</h2>
  <p>Приклади використання градієнту для фонового кольору.</p>
</div>

<div id="result">
  <div class="box"></div>
  <div class="box modified"></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: space-around;
}

.box {
  width: 200px;
  height: 200px;
  background: linear-gradient(to right, red, blue);
}

.box.modified {
  background: linear-gradient(to right, blue, green);
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.