JSFiddle - React, Tailwind, and code Playground
HTML
<a href="http://www.example.com/download-content.html" class="download-icon">
<span></span>
Download
</a>
CSS
a.download-icon
{
color: #333;
font-size: 1.3rem;
font-weight: bold;
text-decoration: none;
}
.download-icon span
{
display: block;
cursor: pointer;
position: relative;
width: 60px;
height: 30px;
margin: auto;
border: 10px solid #333;
border-top: transparent;
}
.download-icon span:before,
.download-icon span:after
{
content: '';
display: block;
position: absolute;
}
a.download-icon:hover span:before,
a.download-icon:hover span:after
{
animation: bounce .5s infinite alternate;
-webkit-animation: bounce .5s infinite alternate;
}
a.download-icon:hover span:before{
left: 15px;
top: -9px;
width: 10px;
height: 10px;
background: #333;
}
a.download-icon:hover span:after
{
left: 10px;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #333;
}
@keyframes bounce {
from {
transform: translateY(-10px);
}
to {
transform: translateY(0);
}
}
@-webkit-keyframes bounce {
from {
-webkit-transform: translateY(-10px);
}
to {
-webkit-transform: translateY(0);
}
}