JSFiddle - React, Tailwind, and code Playground

by WORKMAN

HTML

<div class="d1">
  <h3><span>Заголовок 1</span></h3>
</div>
<div class="d2">
  <h3><span>Заголовок 2</span></h3>
</div>
<div class="d3">
  <h3><span>Заголовок 3</span></h3>
</div>
<div class="d4">
  <h3>Заголовок 4</h3>
</div>
<div class="d5">
  <h3>Заголовок 5</h3>
</div>
<div class="d6">
  <h3>Заголовок 6</h3>
</div>
<div class="d7">
  <h3>Заголовок 7</h3>
</div>
<div class="d8">
  <h3>Заголовок 8</h3>
</div>
<div class="d9">
  <h3>Заголовок 9</h3>
</div>
<div class="d10">
  <h3>Заголовок 10</h3>
</div>
<div class="d11">
  <h3>Заголовок 11</h3>
</div>
<div class="d14">
  <h3>Заголовок 14</h3>
</div>

CSS

h3 {
  font-family: 'Merriweather', serif;
  font-size: 20px;
  letter-spacing: 1px;
  max-width: 320px;
  width: 100%;
  position: relative;
  display: inline-block;
  color: #465457;
}

.d1 h3 {
  color: #F16246;
  text-align: center;
}

.d1 h3:before {
  content: "";
  position: absolute;
  top: calc(50% - 1px);
  left: 0;
  right: 0;
  height: 2px;
  background: #E5EDEA;
  z-index: -1;
}

.d1 span {
  background: white;
  padding: 0 20px;
}

.d2 h3 {
  text-align: center;
}

.d2 h3:before {
  content: "";
  position: absolute;
  top: calc(50% - 5px);
  left: 0;
  right: 0;
  height: 6px;
  border-top: 2px solid #BBC9C9;
  border-bottom: 2px solid #BBC9C9;
  z-index: -1;
}

.d2 span {
  background: white;
  padding: 0 20px;
}

.d3 h3:before {
  content: "";
  position: absolute;
  top: calc(50% - 6px);
  left: 0;
  right: 0;
  height: 12px;
  background: #A6D8CB;
  z-index: -1;
}

.d3 span {
  background: white;
  padding: 0 15px;
  margin-left: 20px;
}

.d4 h3 {
  padding-bottom: 10px;
  border-bottom: 2px solid #E5EDEA;
}

.d4 h3:after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 30%;
  height: 4px;
  background: #A6D8CB;
}

.d5 h3 {
  padding-top: 10px;
}

.d5 h3:before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 25%;
  height: 2px;
  background: #D8BD3D;
}

.d6 h3 {
  text-align: center;
  padding-bottom: 10px;
}

.d6 h3:after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  margin-left: -15%;
  width: 30%;
  height: 2px;
  background: #FA5F4C;
}

.d7 h3 {
  text-align: center;
  padding-bottom: 10px;
}

.d7 h3:before {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  margin-left: -25%;
  width: 50%;
  height: 2px;
  background: #79F8D7;
}

.d7 h3:after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  margin-left: -15%;
  width: 30%;
  height: 2px;
  background: #79F8D7;
}

.d8 h3 {
  text-align: center;
  padding-bottom: 10px;
}

.d8...