HTML CODE:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Text Animation</title>
<link rel="stylesheet" type="text/css" href="css/ash.css">
</head>
<body>
<div class="text">
<span>A</span>
<span>s</span>
<span>h</span>
<span>h</span>
<span>h</span>
</div>
</body>
</html>
CSS CODE:
body{
margin: 0;
padding: 0;
height: 100vh;
font-family: "Montserrat";
display: flex;
align-items: center;
justify-content: center;
background-color:#B4BDC2;
}
.text{
font-size: 60px;
color: black;
font-weight: 900;
position: relative;
}
.text::after{
content: "";
position: absolute;
width: 36px;
height: 14px;
background-color:grey;
border-radius: 10px;
border:1px solid black;
bottom: 14px;
left: -54px;
animation: trans 1.1s linear infinite;
opacity: 0;
}
@keyframes trans{
20%{
opacity: 1;
}
80%{
opacity: 1;
}
100%{
left: calc(100% + 18px);
}
}
.text span{
display: inline-block;
animation: wave 1.1s linear infinite;
}
.text span:nth-child(2){
animation-delay: 100ms;
}
.text span:nth-child(3){
animation-delay: 200ms;
}
.text span:nth-child(4){
animation-delay: 300ms;
}
.text span:nth-child(5){
animation-delay: 400ms;
}
@keyframes wave{
50%{
transform: translateY(-32px);
}
}

Comments
Post a Comment