JSFiddle - React, Tailwind, and code Playground

by Kocsten

HTML

<div class="dakolxrynka">
  <button class="kivurmanes-1">ZORNET.RU 1</button>
  <button class="kivurmanes-2">ZORNET.RU 2</button>
  <button class="kivurmanes-3">ZORNET.RU 3</button>
  <button class="kivurmanes-4">ZORNET.RU 4</button>
  <button class="kivurmanes-5">ZORNET.RU 5</button>
</div>

CSS

body {
  background: #2e9fcc;;
  font-size: 63%;
}

.dakolxrynka {
  padding: 2.5em;
}


button,
button::after {
  -webkit-transition: all 0.3s;
	-moz-transition: all 0.3s;
  -o-transition: all 0.3s;
	transition: all 0.3s;
}

button {
  background: none;
  border: 3px solid #f5efef;
  border-radius: 5px;
  color: #eae9e9;
  display: block;
  font-size: 1.6em;
  font-weight: bold;
  margin: 1em auto;
  padding: 2em 6em;
  position: relative;
  text-transform: uppercase;
  cursor:pointer;
}

button::before,
button::after {
  background: #f1f0f0;
  content: '';
  position: absolute;
  z-index: -1;
}

button:hover {
  color: #2e56cc;
}

/* BUTTON 1 */
.kivurmanes-1::after {
  height: 0;
  left: 0;
  top: 0;
  width: 100%;
}

.kivurmanes-1:hover:after {
  height: 100%;
}

/* BUTTON 2 */
.kivurmanes-2::after {
  height: 100%;
  left: 0;
  top: 0;
  width: 0;
}

.kivurmanes-2:hover:after {
  width: 100%;
}

/* BUTTON 3 */
.kivurmanes-3::after {
  height: 0;
  left: 50%;
  top: 50%;
  width: 0;
}

.kivurmanes-3:hover:after {
  height: 100%;
  left: 0;
  top: 0;
  width: 100%;
}

/* BUTTON 4 */
.kivurmanes-4::before {
  height: 100%;
  left: 0;
  top: 0;
  width: 100%;
}

.kivurmanes-4::after {
  background: #2e73cc;
  height: 100%;
  left: 0;
  top: 0;
  width: 100%;
}

.kivurmanes-4:hover:after {
  height: 0;
  left: 50%;
  top: 50%;
  width: 0;
}



.kivurmanes-5 {
  overflow: hidden;
}

.kivurmanes-5::after {
  height: 100%;
  left: -37%;
  top: 0;
  transform: skew(50deg);
  transition-duration: 0.7s;
  transform-origin: top left;
  width: 0;
}

.kivurmanes-5:hover:after {
  height: 99.8%;
  width: 138%;
}