Tue Aug 23 2022
Text Stroke Animation
CSS4665 views
File Name: text-stroke-animation.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 Stroke Animation</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=Prompt:wght@700&display=swap" rel="stylesheet">
<style>
* {
margin: 0;
padding: 0;
font-family: 'Prompt', sans-serif;
}
body {
background-color: #292929;
}
section {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100vh;
}
h1 {
font-size: 150px;
background: linear-gradient(-70deg, #eef85b 5%, #7aec8d 53%, #09e5c3 91%);
color: #292929;
background-clip: text;
-webkit-background-clip: text;
-webkit-text-stroke: 4px transparent;
letter-spacing: 4px;
}
h1:hover {
background-size: 200%;
animation: ani 5s linear infinite;
}
@keyframes ani {
0% {
background-position: 0 0;
}
50% {
background-position: 400% 0;
}
100% {
background-position: 0 0;
}
}
</style>
</head>
<body>
<section>
<h1>Geekboots</h1>
</section>
</body>
</html>
Result Screenshot(s)
Author:Geekboots