A lonely swirly link.

In this example below you will see how to do a A lonely swirly link. with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by depy, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright depy ©

Technologies

  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>A lonely swirly link.</title>
  
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">

  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <div class="content">
  <a class="swirly-link" href="#">A Lonely Link</a>
</div>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/depy/a-lonely-swirly-link-BVyEBM */


.content {
  text-align: center;
}

.swirly-link {
  position: relative;
  display: inline-block;
  padding: 40px 0;
  color: #333;
  text-decoration: none;
  font-size: 4em;
}

.swirly-link::after {
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  content: "";
  height: 40px;
  width: 100%;

  
  background-image: url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTkuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDUxMiA1MTIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDUxMiA1MTI7IiB4bWw6c3BhY2U9InByZXNlcnZlIiB3aWR0aD0iNTEycHgiIGhlaWdodD0iNTEycHgiPgo8cGF0aCBzd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xNiw0Mi41MzEsMjIuMjMgIGMxNy4yOTYsMTYuNzA0LDQwLjk4MywzOS41ODEsODUuNDcyLDM5LjU4MWM0NC40ODgsMCw2OC4xNzUtMjIuODc2LDg1LjQ3MS0zOS41ODFjNC4zMDYtNC4xNTksOC4wNTYtNy43MTcsMTEuNjI2LTEwLjY5MnYtNjkuMTU4ICBDNDU1LjU2MiwyMDUuNzUzLDQzOS4yOTgsMjIxLjQzOCw0MjYuNTI5LDIzMy43N3oiLz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPGc+CjwvZz4KPC9zdmc+Cg==);
  
  background-size: contain;
  background-repeat: repeat-x;
  background-position: 0 0;
  
}

.swirly-link:hover::after {
  animation: swirlWave 6s infinite linear;
}

@keyframes swirlWave {
  0% {
    background-position: 0% 0%;
  }
  
  100% {
    background-position: 100% 0%;
  }
}

Comments