<div class="menu">
    <ul class="menu-spisok">
      <li class="menu-spisok_item"><a href="#menu1" class="menuli"><span>Первая вкладка</span></a></li>
      <li class="menu-spisok_item"><a href="#menu2" class="menuli"><span>Вторая вкладка</span></a></li>
      <li class="menu-spisok_item"><a href="#menu3" class="menuli"><span>Третяя вкладка</span></a></li>
      <li class="menu-spisok_item"><a href="#menu4" class="menuli"><span>Четвертая вкладка</span></a></li>
      <li class="menu-spisok_item"><a href="#menu5" class="menuli"><span>Петая вкладка</span></a></li>
    </ul>
    <div class="wraper">
      <div class="menu_text" id="menu1">Первая вкладка Lorem ipsum dolor sit amet consectetur adipisicing elit.
        Officiis maxime corporis officia omnis quia! Temporibus maxime quis inventore repellat officiis!</div>
      <div class="menu_text" id="menu2">Вторая вкладка Lorem ipsum dolor sit amet consectetur adipisicing elit.
        Officiis maxime corporis officia omnis quia! Temporibus maxime quis inventore repellat officiis!</div>
      <div class="menu_text" id="menu3">Третяя вкладкаLorem ipsum dolor sit amet consectetur adipisicing elit.
        Officiis maxime corporis officia omnis quia! Temporibus maxime quis inventore repellat officiis!</div>
      <div class="menu_text" id="menu4">Четвертая вкладка Lorem ipsum dolor sit amet consectetur adipisicing elit.
        Officiis maxime corporis officia omnis quia! Temporibus maxime quis inventore repellat officiis!</div>
      <div class="menu_text" id="menu5">Петая вкладка Lorem ipsum dolor sit amet consectetur adipisicing elit.
        Officiis maxime corporis officia omnis quia! Temporibus maxime quis inventore repellat officiis!</div>
    </div>
  </div>
.menu {
  margin: 0 auto;
  max-width: 1000px;
  font-size: 14px;
}
.menu-spisok {
  display: flex;
}
.menu-spisok_item {
  flex: 0 1 20%;
  justify-content: center;
  align-items: center;
  height: 50px;
  display: flex;
  text-transform: uppercase;
}
.menu-spisok_item span {
  position: relative;
  z-index: 2;
}
.menu-spisok_item a:active{
  color: white;
}
.menu_text {
  padding: 20px;
  line-height: 20px;
  display: none;
  position: relative;
}

.menu_text:target {
  display: block;
}
.wraper {
  position: relative;
}
.menu_text::before {
  content: "";
  height: 50px;
  top: -50px;
  width: 20%;
  position: absolute;
}

.menu_text:nth-child(1) {
  background: red;
}
.menu_text:nth-child(1)::before {
  left: 0;
  background: red;
}
.menu_text:nth-child(2)::before {
  left: 20%;
  background: yellow;
}
.menu_text:nth-child(3)::before {
  left: 40%;
  background: green;
}
.menu_text:nth-child(4)::before {
  left: 60%;
  background: grey;
}
.menu_text:nth-child(5)::before {
  right: 0;
  background: purple;
}
.menu_text:nth-child(2) {
  background: yellow;
}
.menu_text:nth-child(3) {
  background: green;
}
.menu_text:nth-child(4) {
  background: grey;
}
.menu_text:nth-child(5) {
  background: purple;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.