INDEX.HTML
<html>
<head>
<meta chrset=”utf-8″>
<title>Animation Text</title>
<link rel=”stylesheet” href=”style.css”>
</head>
<body>
<div class=”container”>
<span class=”text1″> Ariel Esposito</span>
<span class=”text2″>Animation</span>
</div>
</body>
STYLE.CSS
*{
padding: 0;
margin: 0;
font font-family: sans-serif;
}
body{
background: #000;
}
.container{
text-align: center;
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%);
width:100%;
}
.container span{
color: white;
text-transform: uppercase;
display: block;
}
.text1{
color: red;
font-size: 60px;
font font-weight: 700;
letter-spacing: 8px;
margin-bottom: 20px;
background: black;
position: relative;
animation: text 3s 1;
}
.text2{
font-size: 30px;
color: red;
}
@keyframes text{
0%{
color: black;
margin-bottom:-40px;
}
30%{
letter-spacing:25px;
margin-bottom: -40px;
}
85%{
letter-spacing: 8px;
margin-bottom: -40px;
}
}