Sat Apr 23 2022
Text Shaking Effect
CSS5711 views
File Name: text-shaking-effect-in-css.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Text Shaking Effect</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Acme&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
}
section {
background-color: #383838;
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
h1 {
font-family: 'Acme', sans-serif;
font-size: 80px;
color: #000;
transform: skewX(-15deg);
text-shadow: 0 3px 5px #030303;
animation: shaking 0.6s 0s infinite alternate,
changeColor 4.8s 0.1s ease-in-out infinite;
}
@keyframes shaking {
0% {
transform: skewX(-15deg);
}
5% {
transform: skewX(15deg);
}
10% {
transform: skewX(-15deg);
}
15% {
transform: skewX(15deg);
}
20% {
transform: skewX(-15deg);
}
25% {
transform: skewX(15deg);
}
30% {
transform: skewX(-15deg);
}
35% {
transform: skewX(15deg);
}
50% {
transform: skewX(0deg);
}
100% {
transform: skewX(0deg);
}
}
@keyframes changeColor {
0% {
color: #fff;
}
24% {
color: #fff;
}
25% {
color: #f05112;
}
49% {
color: #f05112;
}
50% {
color: #f029cf;
}
74% {
color: #f029cf;
}
75% {
color: #9cdf20;
}
99% {
color: #9cdf20;
}
100% {
color: #3253e2;
}
}
</style>
</head>
<body>
<section>
<h1>Geekboots</h1>
</section>
</body>
</html>
Author:Geekboots