JSFiddle - React, Tailwind, and code Playground
by Opick Kusanagi
HTML
<p><a href = '#' class="btn anim">Jiggle</a></p>
CSS
@import url(http://fonts.googleapis.com/css?family=Raleway:700);
body {
width: 100%;
margin: 0;
overflow: hidden;
padding: 0;
background: hsla(0, 5%, 5%, 1);
}
p {
width: 100%;
text-align: center;
position: relative;
margin-top: 45vh;
}
a {
text-decoration: none;
}
.btn {
display: inline-block;
border-radius: 5px;
box-shadow: 1px 1px 10px 3px hsla(0, 0%, 0%, .6);
width: 5em;
padding: 1em;
color: hsla(255, 255%, 255%, 1);
text-align: center;
text-shadow: 0 2px 0 hsla(0, 0%, 0%, .25);
font: 400 1.5em /1 'Raleway', sans-serif;
letter-spacing: 4px;
background: #fc4f3f;
cursor: pointer;
}
.anim {
animation: jiggle 2s ease-in infinite;
}
@keyframes jiggle {
48%, 62% {
transform: scale(1.0, 1.0)
}
50% {
transform: scale(1.1, 0.9)
}
56% {
transform: scale(0.9, 1.1) translate(0, -5px)
}
59% {
transform: scale(1.0, 1.0) translate(0, -3px)
}
}