HTML _CSS
Floating Text
HiroDaegu
2022. 5. 7. 00:09
728x90
SMALL

<!DOCTYPE html>
<html lang="ko">
<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>FLOATING TEXT</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="content">
<h2>WARRIOS</h2>
<h2>WARRIOS</h2>
</div>
</body>
</html>
body {
display: flex;
background: #000;
min-height: 97vh;
align-items: center;
justify-content: center;
font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}
.content {
position: relative;
}
.content h2 {
color: #fff;
font-size: 8em;
position: absolute;
letter-spacing: 5px;
transform: translate(-50%, -50%);
}
.content h2:nth-child(1) {
color: transparent;
-webkit-text-stroke: 2px rgb(254, 205, 7);
}
.content h2:nth-child(2) {
color: #045aa7;
animation: animate 3s ease-in-out infinite;
}
@keyframes animate {
0%, 100% {
clip-path: polygon(
0% 45%,
16% 44%,
33% 50%,
54% 60%,
70% 61%,
84% 59%,
100% 52%,
100% 100%,
0% 100%
);
}
50% {
clip-path: polygon(
0% 60%,
15% 65%,
34% 66%,
51% 62%,
67% 50%,
84% 45%,
100% 46%,
100% 100%,
0% 100%
);
}
}728x90
LIST