JSFiddle - React, Tailwind, and code Playground
by keif
HTML
<nav>
<a href="#"><span>Text</span></a>
</nav>
CSS
nav {
-webkit-animation: fadeIn 2s 1s; /* Chrome, Safari, Opera */
animation: fadeIn 2s 1s;
-webkit-animation-fill-mode: forwards; /* Chrome, Safari, Opera */
animation-fill-mode: forwards;
-webkit-border-radius: 30px;
background-color: rgba(56,56,56,0)
border-radius: 30px;
display: block;
height: 50px;
width: 50px;
}
a {
color: rgba(56,56,56,0);
display: inline-block;
height: 50px;
position: relative;
width: 50px;
}
span {
-webkit-animation: fadeInText 2s 3s; /* Chrome, Safari, Opera */
animation: fadeInText 2s 3s;
-webkit-animation-fill-mode: forwards; /* Chrome, Safari, Opera */
animation-fill-mode: forwards;
color: rgba(56,56,56,0);
left: 50%;
position: absolute;
top: 50%;
transform: translateY(-50%) translateX(-50%);
}
/* Chrome, Safari, Opera */
@-webkit-keyframes fadeIn {
0% {
background-color: rgba(56,56,56,0)
}
50% {
background-color: rgba(56,56,56,1)
}
100% {
background-color: rgba(56,56,56,0.6);
}
}
/* Standard syntax */
@keyframes fadeIn {
0% {
background-color: rgba(211,211,211, 0);
}
50% {
background-color: rgba(211,211,211, 1);
}
100% {
background-color: rgba(211,211,211, 0.7);
}
}
/* Chrome, Safari, Opera */
@-webkit-keyframes fadeInText {
0% {
color: rgba(56,56,56,0);
}
100% {
color: rgba(56,56,56,0.6);
}
}
/* Standard syntax */
@keyframes fadeInText {
0% {
color: rgba(211,211,211, 0);
}
100% {
color: rgba(211,211,211, 1);
}
}