Wed Aug 10 2022

Water Wave Animation

CSS4957 views

File Name: water-wave-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>Water Wave Animation</title>
    <style>
        * {
            margin: 0;
            padding: 0;
         }

         body {
            background-color: #292929;
         }

         section {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            height: 100vh;
         }

         .waterContainer {
            width: 200px;
            height: 200px;
            background-color: #80c5de;
            border-radius: 0 0 40px 40px;
            box-shadow: inset 0 0 50px #1c637c;
            position: relative;
            overflow: hidden;
         }

         .waterContainer::before {
            position: absolute;
            content: '';
            width: 200%;
            height: 200%;
            background-color: #ececec;
            top: -150%;
            left: -50%;
            border-radius: 40%;
            animation: wave 12s infinite linear;
         }

         .waterContainer::after {
            position: absolute;
            content: '';
            width: 204%;
            height: 204%;
            background-color: #ececec80;
            top: -150%;
            left: -52%;
            border-radius: 40%;
            animation: wave 12s infinite linear;
            animation-delay: 0.5s;
         }
         
         @keyframes wave {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
         }
         
    </style>
</head>
<body>
    <section>
        <div class="waterContainer"></div>
    </section>
</body>
</html>

Result Screenshot(s)

Water Wave AnimationWorking Sample0

We use cookies to improve your experience on our site and to show you personalised advertising. Please read our cookie policy and privacy policy.