Css Gradient Button

by Venkatesh Dematti

HTML

<!DOCTYPE html>
<!--Code By Webdevtrick ( https://webdevtrick.com )-->
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Gradient Ghost Button | Webdevtrick.com</title>
    <link href="https://fonts.googleapis.com/css?family=Squada+One&display=swap" rel="stylesheet">
    <link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
    <a href="https://webdevtrick.com" target="_blank"><span>button</span></a>
</body>
</html>

CSS

/** Code By Webdevtrick ( https://webdevtrick.com ) **/
body {
  background: #212121 url(https://webdevtrick.com/wp-content/uploads/sunset-background.jpg) 0 0 no-repeat;
  background-size: cover;
}
body:after {
  content: '';
  background: rgb(33,33,33, 0.85);
}
a {
  display: block;
  width: 220px;
  height: 70px;
  z-index: 1;
}
a:after {
  content: '';
  background: linear-gradient(120deg, #8A2387, #E94057, #F27121);
  background-size: 400% 400%;
  -webkit-clip-path: polygon(0% 100%, 4px 100%, 4px 4px, 216px 4px, 216px 66px, 4px 66px, 4px 100%, 100% 100%, 100% 0%, 0% 0%);
  -moz-animation: gradient 3s ease-in-out infinite, border 1s forwards ease-in-out reverse;
  -webkit-animation: gradient 3s ease-in-out infinite, border 1s forwards ease-in-out reverse;
  animation: gradient 3s ease-in-out infinite, border 1s forwards ease-in-out reverse;
}
a > span {
  display: block;
  background: linear-gradient(120deg, #8A2387, #E94057, #F27121);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  -moz-animation: gradient 3s ease-in-out infinite;
  -webkit-animation: gradient 3s ease-in-out infinite;
  animation: gradient 3s ease-in-out infinite;
}
 body:after, a, a:after {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}
a {
  font-family: 'Squada One', cursive;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  letter-spacing: 3px;
  line-height: 70px;
  font-size: 30px;
}
@keyframes gradient {
  0% {
    background-position: 14% 0%;
  }
  50% {
    background-position: 87% 100%;
  }
  100% {
    background-position: 14% 0%;
  }
}
@keyframes border {
  0% {
    -webkit-clip-path: polygon(0% 100%, 4px 100%, 4px 4px, 216px 4px, 216px 66px, 4px 66px, 4px 100%, 100% 100%, 100% 0%, 0% 0%);
  }
  25% {
    -webkit-clip-path: polygon(0% 100%, 4px 100%, 4px 4px, 216px 4px, 216px 66px, 216px 66px, 216px 100%, 100% 100%, 100% 0%, 0% 0%);
  }
  50% {
   ...