<div class="toolbar">
  <div>
    <input type="button" class="ok" value="Conferma" />
  </div>
  <div>
    <input type="button" class="cancel" value="Annulla" />
  </div>
  <div>
    <input type="button" class="color" value="Conferma" />
  </div>
</div>
:root {
  --buttongradient-center-color: rgba(210, 246, 180, 1);
}

.toolbar {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.toolbar > div {
  margin-bottom: 10px;
}

input[type="button"] {
  padding: 15px 30px 12px 30px;
  color: white;
  font-weight: bold;

  font-size: 1.1em;
  cursor: pointer;
  border-radius: 15px;
  margin-left: 10px;
  margin-right: 10px;

  border: 1px solid black;
  border-bottom-width: 8px;
  outline: none;
}

input[type="button"].ok {
  background-color: green;
  border-color: darkgreen;
}
input[type="button"].cancel {
  background-color: lightgray;
  border-color: gray;
  color: darkgray;
}
input[type="button"].color {
  border-color: #0c20fe;
  background: rgb(99, 111, 219);
  background: linear-gradient(
    0deg,
    rgba(99, 111, 219, 1) 0%,
    var(--buttongradient-center-color) 50%,
    rgba(99, 111, 219, 1) 100%
  );
}

input[type="button"].ok:hover,
input[type="button"].cancel:hover {
  animation-name: animation_button;
  animation-duration: 1s;
  animation-direction: alternate;
  animation-fill-mode: forwards;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}
input[type="button"].ok:active,
input[type="button"].cancel:active {
  animation-name: animation_button_go;
  animation-duration: 0.5s;
  animation-direction: alternate;
  animation-fill-mode: forwards;
  animation-iteration-count: infinite;
  animation-timing-function: linear;

  position: relative;
}
input[type="button"].color:hover {
  animation-name: animation_button_color;
  animation-duration: 1s;
  animation-direction: alternate;
  animation-fill-mode: forwards;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}
@keyframes animation_button {
  from {
    border-radius: 15px;
  }
  50% {
    border-radius: 8px;
    transform: scale(1.05) translate(-2px, -2px);
  }
  to {
    border-radius: 15px;
  }
}

@keyframes animation_button_go {
  0% {
    left: -10px;
  }
  50% {
    left: 0px;
  }
  100% {
    left: 10px;
  }
}

@keyframes animation_button_color {
  0% {
    background: linear-gradient(
      0deg,
      rgba(99, 111, 219, 1) 0%,
      var(--buttongradient-center-color) 0%,
      rgba(99, 111, 219, 1) 100%
    );
  }
  10% {
    background: linear-gradient(
      0deg,
      rgba(99, 111, 219, 1) 0%,
      var(--buttongradient-center-color) 10%,
      rgba(99, 111, 219, 1) 100%
    );
  }
  20% {
    background: linear-gradient(
      0deg,
      rgba(99, 111, 219, 1) 0%,
      var(--buttongradient-center-color) 20%,
      rgba(99, 111, 219, 1) 100%
    );
  }
  30% {
    background: linear-gradient(
      0deg,
      rgba(99, 111, 219, 1) 0%,
      var(--buttongradient-center-color) 30%,
      rgba(99, 111, 219, 1) 100%
    );
  }
  40% {
    background: linear-gradient(
      0deg,
      rgba(99, 111, 219, 1) 0%,
      var(--buttongradient-center-color) 40%,
      rgba(99, 111, 219, 1) 100%
    );
  }
  50% {
    background: linear-gradient(
      0deg,
      rgba(99, 111, 219, 1) 0%,
      var(--buttongradient-center-color) 50%,
      rgba(99, 111, 219, 1) 100%
    );
  }
  60% {
    background: linear-gradient(
      0deg,
      rgba(99, 111, 219, 1) 0%,
      var(--buttongradient-center-color) 60%,
      rgba(99, 111, 219, 1) 100%
    );
  }
  70% {
    background: linear-gradient(
      0deg,
      rgba(99, 111, 219, 1) 0%,
      var(--buttongradient-center-color) 70%,
      rgba(99, 111, 219, 1) 100%
    );
  }
  80% {
    background: linear-gradient(
      0deg,
      rgba(99, 111, 219, 1) 0%,
      var(--buttongradient-center-color) 80%,
      rgba(99, 111, 219, 1) 100%
    );
  }
  90% {
    background: linear-gradient(
      0deg,
      rgba(99, 111, 219, 1) 0%,
      var(--buttongradient-center-color) 90%,
      rgba(99, 111, 219, 1) 100%
    );
  }
  100% {
    background: linear-gradient(
      0deg,
      rgba(99, 111, 219, 1) 0%,
      var(--buttongradient-center-color) 100%,
      rgba(99, 111, 219, 1) 100%
    );
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.