How to create a bouncing bubble effect using CSS ? Last Updated : 12 Jul, 2025 Summarize Comments Improve Suggest changes Share Like Article Like Report The bouncing bubble effect in CSS creates an animation where elements, typically circles or bubbles, move up and down, simulating a bouncing motion. Using properties like @keyframes, transform, and animation, this effect adds a playful, dynamic visual appeal to the webpage.ApproachContainer Setup: The .dot container holds the bouncing bubbles, with each span inside styled to represent individual circular bubbles.Spherical Shape: The border-radius: 50% on .dot and span elements creates a circular shape for the bubbles.Animation Definition: The @keyframes animation animates the bubbles' vertical movement (translateY), creating a bouncing effect from top to bottom.Bubble Styling: Each bubble (span) is uniquely styled with different sizes, colors, opacity, and positions to add variety and visual appeal.Custom Animation Timing: Varying animation-delay and animation-duration for each bubble ensures staggered, dynamic bouncing motions at different speeds and intervals.Example: In this example we are following above-explained approach. html <!DOCTYPE html> <html> <head> <title> How to create a bouncing bubble effect using CSS? </title> <style> * { margin: 0; padding: 0; } /* To give the containers in spherical shape */ .dot { border-radius: 50%; } .dot span { position: absolute; display: block; border: 5px; border-radius: 50%; animation: animate 3s ease-in-out infinite; } /*the animation*/ @keyframes animate { 0% { transform: translateY(-300px); } 50% { transform: translateY(190px); width: -100px; height: +100px; } 100% { transform: translateY(-300px); } } /* Each bubble is defined in a separate section */ /* Set the color, opacity, delay and duration(i.e different speed) */ .dot span:nth-child(1) { top: 300px; left: 250px; height: 160px; width: 160px; background-color: yellow; opacity: 0.7; animation-delay: 0.3s; animation-direction: reverse; } .dot span:nth-child(2) { top: 310px; left: 400px; height: 190px; width: 190px; background-color: green; opacity: 0.9; animation-delay: 0.3s; animation-direction: reverse; animation-duration: 2.3s; } .dot span:nth-child(3) { top: 300px; left: 700px; height: 140px; width: 140px; background-color: #a97f58; opacity: 0.9; animation-delay: 0.5s; animation-direction: reverse; animation-duration: 2.6s; } .dot span:nth-child(4) { top: 300px; left: 1080px; height: 200px; width: 200px; background-color: #FA58AC; opacity: 0.9; animation-delay: 0.7s; animation-direction: reverse; animation-duration: 2.3s; } </style> </head> <body> <div class="dot"> <span></span> <span></span> <span></span> <span></span> </div> </body> </html> Output: Comment More infoAdvertise with us Next Article How to create a bounce in and out on scroll effect using CSS ? S srutichatterjee2024 Follow Improve Article Tags : Web Technologies CSS Write From Home CSS-Questions Similar Reads How to create wave ball effect using CSS? Wave ball effect is a new entry in the world of animation effects that are used in the designing of modern web apps. In this effect, we have some balls which are animated like a wave. Now you can add different elements to it make it unique like a different color for balls and animation-delay or by c 3 min read How to Create Circle Loading Animation Effect using CSS ? In this article, we will see how to create a circle-loading animation using HTML and CSS, along with understanding its basic implementation through the example. Generally, Loading Animation is utilized to wait for the content to be fully loaded on the webpage. If some pages don't contain the loader, 6 min read How to create Incoming Call Animation Effect using CSS ? In this article, we will learn how to create an incoming call animation effect, by using CSS. Approach: To create this effect, we essentially need to animate the shadow effects around the element frame, which can be easily manipulated using the CSS box-shadow property. It is described by X and Y off 2 min read How to create a bounce in and out on scroll effect using CSS ? Creating a bounce in and out on the scroll effect can add an exciting and engaging touch to your web design. This effect creates a bouncing animation when the user scrolls down the page, and then bounces back when the user scrolls up. In this article, we will discuss the syntax and approaches to cre 3 min read Create a Button Animation Effect using CSS It is possible to apply various animation effects to any item using the CSS animation property. In order to get the hover effect, we will design a button and use the animation effect. When the user hovers over the button, the underlining for the text expands till it reaches the end. The hover animat 3 min read How to Create Floating Box Effect using HTML and CSS ? The floating box effect is a classical example of a custom box-shadow technique. In this technique, we create realistic-looking shadows without using the box-shadow property that is provided by the CSS. Approach: The approach is to use after selector to use create shadow using the blur function. HTM 2 min read Like