.cursor { width: 40px; height: 40px; border: 1px dashed white; border-radius: 50%; position: absolute; animation: Anim1 1s infinite alternate; pointer-events: none; } .cursor::before { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 5px; height: 5px; background: crimson; border-radius: 50%; } .expand { animation: Anim2 .5s; background: crimson; border: 1px solid crimson; } @keyframes Anim1 { from { transform: scale(1) rotate(0deg); } to { transform: scale(0.7) rotate(190deg); } } @keyframes Anim2 { 0%{ transform: scale(1); } 50%{ transform: scale(2); } 100%{ transform: scale(1); opacity:0; } }