Source codes:
<!DOCTYPE html>
<html>
<head>
<title>Ripple Illusion</title>
<style type=”text/css”>
body{
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
gap: 30px;
height: 100vh;
background: #121212;
color: white;
font-family: sans-serif;
}
.illusion-container{
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
.ripple-illusion{
width: 200px;
height: 200px;
background: radial-gradient(circle, yellow, red);
border-radius: 50%;
animation: ripple 2s linear infinite;
}
@keyframes ripple {
0% {
transform: scale(1);
opacity: 1;
}
100%{
transform: scale(1.5);
opacity: 0;
}
}
</style>
</head>
<body>
<div class=”illusion-container”>
<h2> Ripple illusion </h2>
<div class=”ripple-illusion”></div>
</div>
</body>
</html>