Water Wave Text Animation
Text Animation Effects Using CSS Clip-path
by schrodingers
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>Document</title>
</head>
<body>
<div class="content">
<h2>满</h2>
<h2>满</h2>
</div>
</body>
</html>
CSS
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: #111;
}
.content {
position: relative;
}
.content h2 {
position: absolute;
transform: translate(-50%, -50%);
font-size: 8rem;
}
.content h2:nth-child(1) {
color: transparent;
-webkit-text-stroke: 2px #03a9f4;
animation: animate 4s ease-in-out;
}
.content h2:nth-child(2) {
color: #03a9f4;
-webkit-text-stroke: 2px #03a9f4;
animation: animate 4s ease-in-out;
}
@keyframes animate {
0%,
100% {
clip-path: polygon(0% 65%, 22% 58%, 39% 69%, 62% 59%, 78% 67%, 99% 60%, 100% 100%, 0% 100%);
}
50% {
clip-path: polygon(0% 65%, 21% 80%, 40% 83%, 56% 65%, 78% 60%, 100% 91%, 100% 100%, 0% 100%);
}
}