Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

How to create Incoming Call Animation Effect using CSS ?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

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 offsets relative to the element, blur and spread radius, and color. To create the animation effect, we use the CSS animation property, which lets us configure the timing, duration, and other details of how the animation sequence progress. To control the intermediate steps of the animation sequence, we use @keyframes which lets us specify/alter the CSS style property, in the entire duration of the animation sequence.


box-shadow: offset-x | offset-y | blur-radius | color 

HTML Code: In “index.html”, we define our element, on which animation effect is going to work. Link the stylesheet which contains the animation code.



<!DOCTYPE html>
    <meta charset='utf-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <title>Incoming Call Animation</title>
    <meta name='viewport' content='width=device-width, initial-scale=1'>
    <link rel='stylesheet' type='text/css' media='screen' href='main.css'>
    <link rel="stylesheet" href=
        crossorigin="anonymous" />
    <div class="call-animation">
       <i class="fas fa-phone-volume caller-img"></i>

CSS Code: In the “main.cssfile, we target the element using the class name, call-animation, which has a CSS animation property, and it specifies animation-name, animation-duration, animation-timing-function, and animation-iteration-count. Using @keyframes, we change the CSS box-shadow property, at intervals of the animation sequence. These intervals are specified in percentage, where 0% represents the beginning of the animation and 100% represents the completion of the animation.


    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #71AFFF;
    background: rgb(130, 221, 233);
    width: 100px;
    height: 100px;
    border-radius: 100%;
    border: solid 5px rgb(252, 241, 241);
    animation: call 1.5s ease infinite;
    color: aliceblue;
    font-size: 35px;
    font-weight: bold;
    position: relative;
    position: absolute;
    height: 50px;
    width: 50px;
    top: 35px;
    left: 35px;
@keyframes call {
    15% {
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.5);
    25% {
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.5),
                    0 0 0 16px rgba(255, 255, 255, 0.3);
    30% {
        box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.5),
                    0 0 0 24px rgba(255, 255, 255, 0.3);


Ph incomming

My Personal Notes arrow_drop_up
Last Updated : 15 Dec, 2021
Like Article
Save Article
Similar Reads
Related Tutorials