Pulsing Conic Gradient with HTML CSS

Pulsing Conic Gradient with HTML CSS

Source code:

<!DOCTYPE html>
<html lang=”en”>
<head>

<title>Pulsing Conic Gradient</title>
<style>

body{
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
gap: 30px;
background: #121212;
height: 100vh;
color: white;
font-family: sans-serif;
}

.illusion-container{
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}

.pulsing-illusion{
width: 200px;
height: 200px;
background: conic-gradient(#f00, #0f0, #00f, #f00);
border-radius: 50%;
animation: pulse 1.5s infinite;
}

@keyframes pulse{
0%, 100%{
transform: scale(1);
}
50%{
transform: scale(1.2);
}
}

</style>
</head>
<body>

<div class=”illusion-container”>
<h2>Pulisng Conic Gradient</h2>
</div>
<div class=”pulsing-illusion”></div>

</body>
</html>

Scroll to Top