Create Button Bounce Animation Using HTML and CSS
HTML:
<button class="btn">
<img src="download-icon.png">Download
</button>
CSS:
*{
margin: 0;
padding: 0;
font-family: 'Poppins', sans-serif;
}
body{
background: #f3f2ff;
}
.btn img{
width: 25px;
margin-right: 10px;
}
.btn{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
font-size: 16px;
font-weight: 500;
padding: 15px 40px;
background: linear-gradient(135deg, #ff590f, #ff27a4);
color: #fff;
border-radius: 8px;
border: 0;
outline: 0;
display: flex;
align-items: center;
cursor: pointer;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.25);
animation: bounce 0.5s cubic-bezier(0.8,0,1,1) infinite alternate;
}
@keyframes bounce {
100%{
margin-top: 30px;
}
}
Download the icon 👉 download-icon.png