1
My goal would be to make it look like "waves" inside H2. I’ve tried everything but I can’t, I tried to make a @keyframes:
@keyframes animate {
clip-path: polygon(0 47%, 19% 48%, 34% 56%, 55% 61%, 79% 59%, 98% 50%, 100%
99%, 0 100%);
}
But I did not get the result is just the "Water" stopped with a part in blue. Following is my code:
HTML:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=devicewidth, initial-scale">
<title>Água</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="liquid">
<h2>Water</h2>
<h2>Water</h2>
</div>
</body>
</html>
CSS:
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
.liquid {
position: relative;
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background: #183954;
}
.liquid h2 {
position: absolute;
font-size: 26vh;
}
.liquid h2:nth-child(1) {
color: #fff;
text-shadow: -2px 2px 0px #183954,
-4px 4px 0px #183954,
-6px 6px 0px #183954,
-8px 8px 0px #183954,
-18px 18px 20px rgba(0,0,0,0.5),
-18px 18px 50px rgba(0,0,0,0.5);
}
.liquid h2:nth-child(2) {
color: #2196f3;
clip-path: polygon(0% 46%, 16% 45%, 34% 52%, 50% 61%, 68% 65%, 85% 61%, 100% 53%, 100% 100%, 0% 100%0);
}
Any tips on how to fix this?